Skip to content

Commit

Permalink
Changed github action tests (for each terraform cli version) to run i…
Browse files Browse the repository at this point in the history
…n sequence instead of in parallel
  • Loading branch information
Johan Körner committed Nov 27, 2024
1 parent 35913c5 commit 859a561
Showing 1 changed file with 118 additions and 11 deletions.
129 changes: 118 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,14 @@ jobs:
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after docs generation. Run 'make generate' command and commit."; exit 1)
# Run acceptance tests in a matrix with Terraform CLI versions
test:
# Run acceptance tests in sequence for each supported Terraform CLI versions
test_1_0:
name: Terraform Provider Acceptance Tests
needs: build
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
- '1.4.*'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
Expand All @@ -82,7 +74,122 @@ jobs:
cache: true
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: ${{ matrix.terraform }}
terraform_version: '1.0.*'
terraform_wrapper: false
- run: go mod download
- env:
ABION_API_KEY: ${{ secrets.ABION_API_KEY }}
ABION_API_HOST: ${{ vars.ABION_API_HOST }}
run: make testacc
timeout-minutes: 20
test_1_1:
name: Terraform Provider Acceptance Tests
needs: test_1_0
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: '1.1.*'
terraform_wrapper: false
- run: go mod download
- env:
ABION_API_KEY: ${{ secrets.ABION_API_KEY }}
ABION_API_HOST: ${{ vars.ABION_API_HOST }}
run: make testacc
timeout-minutes: 20
test_1_2:
name: Terraform Provider Acceptance Tests
needs: test_1_1
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: '1.2.*'
terraform_wrapper: false
- run: go mod download
- env:
ABION_API_KEY: ${{ secrets.ABION_API_KEY }}
ABION_API_HOST: ${{ vars.ABION_API_HOST }}
run: make testacc
timeout-minutes: 20
test_1_3:
name: Terraform Provider Acceptance Tests
needs: test_1_2
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: '1.3.*'
terraform_wrapper: false
- run: go mod download
- env:
ABION_API_KEY: ${{ secrets.ABION_API_KEY }}
ABION_API_HOST: ${{ vars.ABION_API_HOST }}
run: make testacc
timeout-minutes: 20
test_1_4:
name: Terraform Provider Acceptance Tests
needs: test_1_3
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: '1.4.*'
terraform_wrapper: false
- run: go mod download
- env:
ABION_API_KEY: ${{ secrets.ABION_API_KEY }}
ABION_API_HOST: ${{ vars.ABION_API_HOST }}
run: make testacc
timeout-minutes: 20
test_1_5:
name: Terraform Provider Acceptance Tests
needs: test_1_4
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: '1.5.*'
terraform_wrapper: false
- run: go mod download
- env:
Expand Down

0 comments on commit 859a561

Please sign in to comment.