From 5dbf994d8e432c571a3fafb2c4019047dc9f789a Mon Sep 17 00:00:00 2001 From: jamelreid Date: Sat, 15 Jan 2022 13:58:25 -0500 Subject: [PATCH] Added steps to tests condition evaluation --- .github/workflows/pr-smoke-test.yml | 33 +++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml index a875d04c4d6..406307c0489 100644 --- a/.github/workflows/pr-smoke-test.yml +++ b/.github/workflows/pr-smoke-test.yml @@ -50,7 +50,7 @@ jobs: UPDATE_WC: 1 DEFAULT_TIMEOUT_OVERRIDE: 120000 run: | - pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js + pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.j - name: Post Smoke tests results comment on PR if: always() @@ -81,7 +81,7 @@ jobs: UPDATE_WC: 1 DEFAULT_TIMEOUT_OVERRIDE: 120000 run: | - pnpx wc-e2e test:e2e + pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.j - name: Post E2E tests results comment on PR if: always() @@ -101,3 +101,32 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} labels: 'run: smoke tests' + + - name: Remove label from pull request 2. + if: | + always() && + ${{ contains( github.event.pull_request.labels.*.name, format('run{0} smoke tests', ':')) }} + uses: actions-ecosystem/action-remove-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: 'run: smoke tests' + + - name: Remove label from pull request 3. + if: | + ${{ always() + && contains( github.event.pull_request.labels.*.name, format('run{0} smoke tests', ':')) + }} + uses: actions-ecosystem/action-remove-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: 'run: smoke tests' + + - name: Remove label from pull request 4. + if: | + always() + && contains( github.event.pull_request.labels.*.name, format('run{0} smoke tests', ':')) + + uses: actions-ecosystem/action-remove-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: 'run: smoke tests'