Repository navigation
61 lines (51 loc) · 1.82 KB
/
Copy pathbrowser-weekly.yml
File metadata and controls
61 lines (51 loc) · 1.82 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
name: Browser weekly
# The full credential-free browser suite on desktop and mobile Chromium, and
# the service worker's offline test against a production build. Pull requests
# run only the @smoke subset (deploy.yml), so this catches what the subset
# skips, at most a week late. A change that spans many pages runs it on its
# branch with `gh workflow run browser-weekly.yml --ref <branch>`.
on:
schedule:
- cron: "47 2 * * 2"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: browser-weekly-${{ github.ref }}
cancel-in-progress: true
jobs:
browser-tests:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/node-deps
- name: Cache Playwright browsers
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Browser tests
env:
CI: 1
PORT: 18080
PLAYWRIGHT_BASE_URL: http://127.0.0.1:18080
run: npm run test:e2e
- name: Service worker offline test
if: ${{ !cancelled() }}
run: npm run build && npm run test:sw
- name: Upload browser failure artifacts
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: chromium-weekly-failure-${{ github.run_id }}
path: |
test-results/
playwright-report/
if-no-files-found: ignore
retention-days: 7