Skip to content

Commit 0761ca8

Browse files
authored
ci: run integration tests before release (#315)
1 parent 8b04ef7 commit 0761ca8

File tree

2 files changed

+66
-6
lines changed

2 files changed

+66
-6
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,58 @@ on:
1515
tags:
1616
- "v*"
1717
jobs:
18+
test:
19+
name: Run Integration Tests
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
go-version: "1.22"
26+
id: go
27+
28+
- name: Check out code into the Go module directory
29+
uses: actions/checkout@v4
30+
31+
- name: Get dependencies
32+
run: |
33+
go mod download
34+
35+
- name: Build
36+
env:
37+
CGO_ENABLED: "0"
38+
run: |
39+
go build -v .
40+
41+
- name: Check Versions
42+
id: checkversions
43+
run: |
44+
source <(go run ./scripts/coderversion)
45+
echo "CODER_MAINLINE_VERSION=${CODER_MAINLINE_VERSION}" >> "${GITHUB_OUTPUT}"
46+
echo "CODER_STABLE_VERSION=${CODER_STABLE_VERSION}" >> "${GITHUB_OUTPUT}"
47+
echo "CODER_OLDSTABLE_VERSION=${CODER_OLDSTABLE_VERSION}" >> "${GITHUB_OUTPUT}"
48+
49+
- name: Run integration test (mainline)
50+
env:
51+
CODER_IMAGE: "ghcr.io/coder/coder"
52+
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_MAINLINE_VERSION }}
53+
run: |
54+
go test -v ./integration
55+
56+
- name: Run integration test (stable)
57+
env:
58+
CODER_IMAGE: "ghcr.io/coder/coder"
59+
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_STABLE_VERSION }}
60+
run: |
61+
go test -v ./integration
62+
63+
- name: Run integration test (oldstable)
64+
env:
65+
CODER_IMAGE: "ghcr.io/coder/coder"
66+
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_OLDSTABLE_VERSION }}
67+
run: |
68+
go test -v ./integration
69+
1870
goreleaser:
1971
runs-on: ubuntu-latest
2072
steps:

.github/workflows/test.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ jobs:
3838
run: |
3939
go build -v .
4040
41+
- name: Check Versions
42+
id: checkversions
43+
run: |
44+
source <(go run ./scripts/coderversion)
45+
echo "CODER_MAINLINE_VERSION=${CODER_MAINLINE_VERSION}" >> "${GITHUB_OUTPUT}"
46+
echo "CODER_STABLE_VERSION=${CODER_STABLE_VERSION}" >> "${GITHUB_OUTPUT}"
47+
echo "CODER_OLDSTABLE_VERSION=${CODER_OLDSTABLE_VERSION}" >> "${GITHUB_OUTPUT}"
48+
4149
- name: Run integration test (devel)
4250
timeout-minutes: 10
4351
env:
@@ -50,25 +58,25 @@ jobs:
5058
timeout-minutes: 10
5159
env:
5260
CODER_IMAGE: "ghcr.io/coder/coder"
61+
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_MAINLINE_VERSION }}
5362
run: |
54-
source <(go run ./scripts/coderversion)
55-
CODER_VERSION="${CODER_MAINLINE_VERSION}" go test -v ./integration
63+
go test -v ./integration
5664
5765
- name: Run integration test (stable)
5866
timeout-minutes: 10
5967
env:
6068
CODER_IMAGE: "ghcr.io/coder/coder"
69+
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_STABLE_VERSION }}
6170
run: |
62-
source <(go run ./scripts/coderversion)
63-
CODER_VERSION="${CODER_STABLE_VERSION}" go test -v ./integration
71+
go test -v ./integration
6472
6573
- name: Run integration test (oldstable)
6674
timeout-minutes: 10
6775
env:
6876
CODER_IMAGE: "ghcr.io/coder/coder"
77+
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_OLDSTABLE_VERSION }}
6978
run: |
70-
source <(go run ./scripts/coderversion)
71-
CODER_VERSION="${CODER_OLDSTABLE_VERSION}" go test -v ./integration
79+
go test -v ./integration
7280
7381
# run acceptance tests in a matrix with Terraform core versions
7482
test:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy