-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (42 loc) · 1.48 KB
/
playwright.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
name: Playwright Tests
on: workflow_call
jobs:
acceptance:
name: ${{ matrix.os }} (${{ matrix.shard }}/4)
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v3
- uses: ./.github/setup-acceptance
- run: npm run update-snapshots -- --shard=${{ matrix.shard }}/4
working-directory: e2e-tests
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: playwright-report--${{ matrix.os }}-${{matrix.shard}}
path: ./e2e-tests/playwright-report/
retention-days: 30
- name: Commit Updated Snapshots
id: push-snapshots
uses: EndBug/add-and-commit@v9
if: ${{ github.event_name == 'pull_request' }}
with:
message: Updated snapshots for ${{ matrix.os }} ${{ matrix.shard }} of 4
add: e2e-tests/__screenshots__/*.png
push: true
pull: --rebase --autostash
default_author: github_actions
- name: Fail on snapshots push
run: |
if [[ ${{ steps.push-snapshots.outputs.pushed }} == true ]]; then exit 1; else exit 0; fi
shell: bash