Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci: run integration tests before release #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading