-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: add manual test runs * fixup! debug on push * fixup! add for individual auth case * fixup! add support for org auth * fixup! schedule full runs weekly * fixup! stricter label filter
- Loading branch information
Jeremy Udit
authored
Jan 7, 2022
1 parent
f01e310
commit b8c2fdf
Showing
3 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Dotcom Acceptance Tests (manual) | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
|
||
acceptance-tests-anonymous: | ||
runs-on: ubuntu-latest | ||
if: contains(join(github.event.pull_request.labels.*.name, ', '), 'test/') | ||
steps: | ||
- name: Parse Args | ||
id: args | ||
run: | | ||
echo "::set-output name=run_allowed::$( | ||
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2 | ||
)" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 2 | ||
- name: Acceptance Tests (Anonymous) | ||
id: acceptance-tests-anonymous | ||
uses: terraformtesting/[email protected] | ||
with: | ||
TF_LOG: INFO | ||
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }} | ||
- name: Failed Acceptance Tests (Anonymous) | ||
if: ${{ failure() }} | ||
uses: terraformtesting/[email protected] | ||
with: | ||
TF_LOG: DEBUG | ||
RUN_ALLOWED: ${{ steps.acceptance-tests-anonymous.outputs.run_allowed }} | ||
|
||
|
||
acceptance-tests-individual: | ||
runs-on: ubuntu-latest | ||
if: contains(join(github.event.pull_request.labels.*.name, ', '), 'test') | ||
steps: | ||
- name: Parse Args | ||
id: args | ||
run: | | ||
echo "::set-output name=run_allowed::$( | ||
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2 | ||
)" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 2 | ||
- name: Acceptance Tests (Individual) | ||
id: acceptance-tests-individual | ||
uses: terraformtesting/[email protected] | ||
with: | ||
TF_LOG: INFO | ||
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }} | ||
GITHUB_OWNER: github-terraform-test-user | ||
GITHUB_TEST_USER_TOKEN: ${{ secrets.DOTCOM_TEST_USER_TOKEN }} | ||
GITHUB_TEST_ORGANIZATION: terraformtesting | ||
- name: Failed Acceptance Tests (Individual) | ||
if: ${{ failure() }} | ||
uses: terraformtesting/[email protected] | ||
with: | ||
TF_LOG: DEBUG | ||
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }} | ||
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 | ||
if: contains(join(github.event.pull_request.labels.*.name, ', '), 'test') | ||
steps: | ||
- name: Parse Args | ||
id: args | ||
run: | | ||
echo "::set-output name=run_allowed::$( | ||
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2 | ||
)" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
fetch-depth: 2 | ||
|
||
- name: Acceptance Tests (Organization) | ||
id: acceptance-tests-organization | ||
uses: terraformtesting/[email protected] | ||
with: | ||
TF_LOG: INFO | ||
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }} | ||
GITHUB_ORGANIZATION: terraformtesting | ||
GITHUB_TEST_USER_TOKEN: ${{ secrets.DOTCOM_TEST_USER_TOKEN }} | ||
GITHUB_TEST_OWNER: github-terraform-test-user | ||
|
||
- name: Failed Acceptance Tests (Organization) | ||
uses: terraformtesting/[email protected] | ||
if: ${{ failure() }} | ||
with: | ||
TF_LOG: DEBUG | ||
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }} | ||
GITHUB_ORGANIZATION: terraformtesting | ||
GITHUB_TEST_USER_TOKEN: ${{ secrets.DOTCOM_TEST_USER_TOKEN }} | ||
GITHUB_TEST_OWNER: github-terraform-test-user | ||
|
||
|
||
|
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