-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Refactored acceptance test automation
Signed-off-by: Steve Hipwell <[email protected]>
- Loading branch information
1 parent
84c6bd2
commit 1a83288
Showing
6 changed files
with
79 additions
and
439 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,48 @@ | ||
name: Dotcom Acceptance Tests | ||
name: Acceptance Tests (github.com) | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
branches: | ||
- test/** | ||
- main | ||
|
||
jobs: | ||
permissions: read-all | ||
|
||
acceptance-tests-anonymous: | ||
jobs: | ||
test: | ||
name: Test ${{ matrix.type }} | ||
# if: contains(github.event.pull_request.labels.*.name, 'test') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
type: [anonymous, individual, organization] | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 2 | ||
- name: Acceptance Tests (Anonymous) | ||
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0 | ||
with: | ||
TF_LOG: INFO | ||
|
||
acceptance-tests-individual: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 2 | ||
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
go-version-file: go.mod | ||
cache: true | ||
- name: Acceptance Tests (Individual) | ||
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0 | ||
with: | ||
TF_LOG: INFO | ||
GITHUB_OWNER: github-terraform-test-user | ||
GITHUB_TEST_USER_TOKEN: ${{ secrets.DOTCOM_TEST_USER_TOKEN }} | ||
GITHUB_TEST_ORGANIZATION: terraformtesting | ||
|
||
acceptance-tests-organization: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 2 | ||
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- name: Acceptance Tests (Organization) | ||
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0 | ||
with: | ||
- name: Run tests | ||
env: | ||
TF_LOG: INFO | ||
GITHUB_ORGANIZATION: terraformtesting | ||
GITHUB_TEST_USER_TOKEN: ${{ secrets.DOTCOM_TEST_USER_TOKEN }} | ||
GITHUB_TEST_OWNER: github-terraform-test-user | ||
GITHUB_OWNER: ${{ matrix.type == 'individual' && 'github-terraform-test-user' || '' }} | ||
GITHUB_TEST_ORGANIZATION: ${{ matrix.type == 'individual' && 'terraformtesting' || '' }} | ||
GITHUB_ORGANIZATION: ${{ matrix.type == 'organization' && 'terraformtesting' || '' }} | ||
GITHUB_TEST_OWNER: ${{ matrix.type == 'organization' && 'github-terraform-test-user' || '' }} | ||
GITHUB_TEST_USER_TOKEN: ${{ (matrix.type == 'individual' || matrix.type == 'organization') && secrets.DOTCOM_TEST_USER_TOKEN || '' }} | ||
GITHUB_TOKEN: ${{ (matrix.type == 'individual' || matrix.type == 'organization') && secrets.DOTCOM_TEST_USER_TOKEN || '' }} | ||
run: make testacc |
Oops, something went wrong.