forked from chilli-axe/mpc-autofill
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (67 loc) · 2.26 KB
/
Copy pathtest-frontend.yml
File metadata and controls
67 lines (67 loc) · 2.26 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
name: Frontend tests
on:
pull_request:
paths:
- "frontend/**"
# src/features/guide/docsSite.test.ts shells out to these directly
# (a real subprocess run, not a mock) as its smoke test that
# publish_site.py's emitted artifacts actually exist and render -
# see docs/proposals/proposal-i-docs-as-site-source.md.
- ".github/scripts/publish_wiki.py"
- ".github/scripts/publish_site.py"
- ".github/wiki-publish-map.json"
workflow_dispatch:
jobs:
test:
name: Frontend tests (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
runs-on: ubuntu-latest
# Playwright's browsers + OS deps are pre-baked into this image (matching
# frontend/package-lock.json's pinned @playwright/test version), so the
# composite action below no longer needs to `playwright install`/
# `install-deps` - that apt work was the dominant cost of this job.
container:
image: mcr.microsoft.com/playwright:v1.57.0-noble
options: --user 1001
env:
NEXT_TELEMETRY_DISABLED: 1
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/test-frontend
with:
shard_index: ${{ matrix.shardIndex }}
shard_total: ${{ matrix.shardTotal }}
merge-reports:
name: Merge Playwright reports
if: ${{ !cancelled() }}
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22.15
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Download blob reports
uses: actions/download-artifact@v8
with:
path: frontend/all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge reports
working-directory: frontend
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 30