forked from plausible/analytics
-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (76 loc) · 2.77 KB
/
tracker.yml
File metadata and controls
81 lines (76 loc) · 2.77 KB
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
72
73
74
75
76
77
78
79
80
81
name: Tracker CI
on:
workflow_dispatch:
pull_request:
paths:
- "tracker/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 23.2.0
cache: 'npm'
cache-dependency-path: tracker/package-lock.json
- name: Install dependencies
run: npm --prefix ./tracker ci
- name: Cache Playwright browsers
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
~/.cache/ms-playwright-github
key: playwright-${{ runner.os }}-${{ hashFiles('tracker/package-lock.json') }}
restore-keys: |
playwright-${{ runner.os }}-
- name: Install Playwright system dependencies
working-directory: ./tracker
run: npx playwright install-deps
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: ./tracker
run: npx playwright install
- name: Run Playwright tests
run: npm --prefix ./tracker test -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob
- name: Upload blob report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: blob-report-${{ matrix.shardIndex }}
path: tracker/blob-report
retention-days: 1
merge-sharded-test-report:
if: ${{ !cancelled() }}
needs: [test]
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 23.2.0
cache: 'npm'
cache-dependency-path: tracker/package-lock.json
- name: Install dependencies
run: npm --prefix ./tracker ci
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into list report
working-directory: ./tracker
run: npx playwright merge-reports --reporter list ../all-blob-reports