-
Notifications
You must be signed in to change notification settings - Fork 27
71 lines (71 loc) · 2.23 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: "${{ matrix.project }} (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})"
strategy:
fail-fast: false
matrix:
# project: [chromium, firefox, webkit]
# only firefox is working reliably
project: [firefox]
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./testing
steps:
- uses: actions/cache@v2
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright
- uses: actions/checkout@v4
with:
lfs: "true"
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
- run: npx elm make TestApp.elm --output=TestApp.html
- uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a # node20
with:
run: npx playwright test --project=${{ matrix.project }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
working-directory: ./testing
- uses: actions/upload-artifact@v4
if: always()
with:
name: blob-report-${{ matrix.project }}-${{ matrix.shardIndex }}
path: testing/blob-report/
retention-days: 1
merge-reports:
# Merge reports after test, even if some shards have failed
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- run: npx playwright merge-reports --reporter html ./all-blob-reports
- uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14