Skip to content

chore: add test-basic-failed-only-shards.yml #4

chore: add test-basic-failed-only-shards.yml

chore: add test-basic-failed-only-shards.yml #4

name: demo.playwright.pwc.prod
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
basicTests:
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
name: "PW tests"
timeout-minutes: 60
runs-on: ubuntu-22.04
container: mcr.microsoft.com/playwright:latest
env:
TESTGROUP: basic
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# https://github.com/actions/runner-images/issues/6775
- run: |
echo "$GITHUB_WORKSPACE"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-node@v4
with:
node-version: "18.x"
- name: Install dependencies
run: |
npm ci
npx playwright install chrome
- name: Run Basic Tests - Project A
continue-on-error: true
working-directory: ${{ env.TESTGROUP }}
env:
CURRENTS_PROJECT_ID: bnsqNa
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
run: |
npx pwc --project a --shard=${{ matrix.shard }}/${{ strategy.job-total }} --ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}"
- name: Run Basic Tests - Project B
continue-on-error: true
working-directory: ${{ env.TESTGROUP }}
env:
CURRENTS_PROJECT_ID: bnsqNa
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
run: |
npx pwc --project b --shard=${{ matrix.shard }}/${{ strategy.job-total }} --ci-build-id "${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}"