diff --git a/.github/workflows/playwright-test-reusable.yml b/.github/workflows/playwright-test-reusable.yml index b9d9f564772..4ecb69d05d2 100644 --- a/.github/workflows/playwright-test-reusable.yml +++ b/.github/workflows/playwright-test-reusable.yml @@ -41,6 +41,8 @@ on: secrets: CURRENTS_RECORD_KEY: required: false + CURRENTS_API_KEY: + required: false QA_PERFORMANCE_METRICS_WEBHOOK_URL: required: false QA_PERFORMANCE_METRICS_WEBHOOK_USER: @@ -70,6 +72,9 @@ jobs: matrix: shard: ${{ fromJSON(inputs.shards || '[1, 2, 3, 4, 5, 6, 7, 8]') }} name: Test (Machine ${{ matrix.shard }}) + env: + CURRENTS_API_KEY: ${{ secrets.CURRENTS_API_KEY }} + CURRENTS_CI_BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }} steps: - name: Checkout @@ -89,6 +94,16 @@ jobs: - name: Install Browsers run: pnpm turbo install-browsers:ci + - name: Playwright Last Failed action + id: last-failed-action + if: ${{ env.CURRENTS_API_KEY != '' }} + uses: currents-dev/playwright-last-failed@v1 + with: + or8n: true + pw-output-dir: packages/testing/playwright/test-results + api-key: ${{ secrets.CURRENTS_API_KEY }} + project-id: I0yzoc + - name: Pre-pull Test Container Images if: ${{ !contains(inputs.test-command, 'test:local') }} run: | @@ -104,7 +119,7 @@ jobs: - name: Run Tests run: | if echo "${{ inputs.test-command }}" | grep -q "pwc-p"; then - ${{ inputs.test-command }} --workers=${{ env.PLAYWRIGHT_WORKERS }} + ${{ inputs.test-command }} --workers=${{ env.PLAYWRIGHT_WORKERS }} ${{ steps.last-failed-action.outputs.extra-pw-flags }} else ${{ inputs.test-command }} --shard=${{ matrix.shard }}/${{ strategy.job-total }} --workers=${{ env.PLAYWRIGHT_WORKERS }} fi