Skip to content

Commit

Permalink
ci: run integration tests before release (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstcn authored Nov 28, 2024
1 parent 8b04ef7 commit 0761ca8
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 6 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,58 @@ on:
tags:
- "v*"
jobs:
test:
name: Run Integration Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: |
go mod download
- name: Build
env:
CGO_ENABLED: "0"
run: |
go build -v .
- name: Check Versions
id: checkversions
run: |
source <(go run ./scripts/coderversion)
echo "CODER_MAINLINE_VERSION=${CODER_MAINLINE_VERSION}" >> "${GITHUB_OUTPUT}"
echo "CODER_STABLE_VERSION=${CODER_STABLE_VERSION}" >> "${GITHUB_OUTPUT}"
echo "CODER_OLDSTABLE_VERSION=${CODER_OLDSTABLE_VERSION}" >> "${GITHUB_OUTPUT}"
- name: Run integration test (mainline)
env:
CODER_IMAGE: "ghcr.io/coder/coder"
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_MAINLINE_VERSION }}
run: |
go test -v ./integration
- name: Run integration test (stable)
env:
CODER_IMAGE: "ghcr.io/coder/coder"
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_STABLE_VERSION }}
run: |
go test -v ./integration
- name: Run integration test (oldstable)
env:
CODER_IMAGE: "ghcr.io/coder/coder"
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_OLDSTABLE_VERSION }}
run: |
go test -v ./integration
goreleaser:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
run: |
go build -v .
- name: Check Versions
id: checkversions
run: |
source <(go run ./scripts/coderversion)
echo "CODER_MAINLINE_VERSION=${CODER_MAINLINE_VERSION}" >> "${GITHUB_OUTPUT}"
echo "CODER_STABLE_VERSION=${CODER_STABLE_VERSION}" >> "${GITHUB_OUTPUT}"
echo "CODER_OLDSTABLE_VERSION=${CODER_OLDSTABLE_VERSION}" >> "${GITHUB_OUTPUT}"
- name: Run integration test (devel)
timeout-minutes: 10
env:
Expand All @@ -50,25 +58,25 @@ jobs:
timeout-minutes: 10
env:
CODER_IMAGE: "ghcr.io/coder/coder"
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_MAINLINE_VERSION }}
run: |
source <(go run ./scripts/coderversion)
CODER_VERSION="${CODER_MAINLINE_VERSION}" go test -v ./integration
go test -v ./integration
- name: Run integration test (stable)
timeout-minutes: 10
env:
CODER_IMAGE: "ghcr.io/coder/coder"
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_STABLE_VERSION }}
run: |
source <(go run ./scripts/coderversion)
CODER_VERSION="${CODER_STABLE_VERSION}" go test -v ./integration
go test -v ./integration
- name: Run integration test (oldstable)
timeout-minutes: 10
env:
CODER_IMAGE: "ghcr.io/coder/coder"
CODER_VERSION: ${{ steps.checkversions.outputs.CODER_OLDSTABLE_VERSION }}
run: |
source <(go run ./scripts/coderversion)
CODER_VERSION="${CODER_OLDSTABLE_VERSION}" go test -v ./integration
go test -v ./integration
# run acceptance tests in a matrix with Terraform core versions
test:
Expand Down

0 comments on commit 0761ca8

Please sign in to comment.