Merge pull request #31507 from woocommerce/fix/remove-smoke-test-label

Updated workflow to remove label after smoke tests are complete
This commit is contained in:
Ron Rennick 2022-01-04 14:18:32 -04:00 committed by GitHub
commit 76701a8448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -13,10 +13,10 @@ jobs:
steps:
- name: Create dirs.
run: |
mkdir -p code/woocommerce
mkdir -p package/woocommerce
mkdir -p tmp/woocommerce
mkdir -p node_modules
mkdir -p code/woocommerce
mkdir -p package/woocommerce
mkdir -p tmp/woocommerce
mkdir -p node_modules
- name: Checkout code.
uses: actions/checkout@v2
@ -32,10 +32,10 @@ jobs:
pnpm nx composer-install-no-dev woocommerce
pnpm nx build-assets woocommerce
pnpm install jest
- name: Run smoke test.
working-directory: package/woocommerce/plugins/woocommerce
if: steps.installation.outcome == 'success'
if: always()
env:
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
@ -55,7 +55,7 @@ jobs:
- name: Post Smoke tests results comment on PR
if: always()
uses: actions/github-script@v5
env:
env:
TITLE: 'Smoke Test Results'
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
with:
@ -66,7 +66,7 @@ jobs:
- name: Run E2E tests.
working-directory: package/woocommerce/plugins/woocommerce
if: steps.installation.outcome == 'success'
if: always()
env:
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
@ -86,7 +86,7 @@ jobs:
- name: Post E2E tests results comment on PR
if: always()
uses: actions/github-script@v5
env:
env:
TITLE: 'E2E Test Results'
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
with:
@ -96,7 +96,7 @@ jobs:
await script({github, context})
- name: Remove label from pull request.
if: "${{ contains(github.event.pull_request.labels.*.name, 'run: smoke tests') }}"
if: always() && ${{ contains(github.event.label.name, format( 'run{0} smoke tests', ':') ) }}
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}