-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (45 loc) · 1.43 KB
/
rerun-shards-pwc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: failed-only-shards
on:
workflow_dispatch:
jobs:
test-shards:
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3]
timeout-minutes: 60
runs-on: ubuntu-latest
container: mcr.microsoft.com/playwright:v1.49.0-noble
env:
CURRENTS_PROJECT_ID: bnsqNa
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
CURRENTS_CI_BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
# 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: "20.x"
- name: Install dependencies
run: |
npm ci
npx playwright install chrome
- name: Playwright Last Failed action
id: last-failed-action
uses: currents-dev/playwright-last-failed@v1
with:
# debug: true
pw-output-dir: basic/test-results
matrix-index: ${{ matrix.shard }}
matrix-total: ${{ strategy.job-total }}
- name: Playwright Tests
working-directory: ./basic
run: |
COMMAND="npx pwc ${{ steps.last-failed-action.outputs.extra-pw-flags }}"
echo "Running command: $COMMAND"
$COMMAND