-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (60 loc) · 1.73 KB
/
Copy pathtests.yml
File metadata and controls
67 lines (60 loc) · 1.73 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: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
id-token: write # required for npm provenance on publish
jobs:
# Run Node-only unit tests across supported runtime versions.
unit-tests:
name: Unit tests (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node: [20, 22, 24]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm test
# Run Cypress integration tests against the example page.
# First run records a baseline, second run compares against it.
integration-tests:
name: Integration tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'npm'
- uses: actions/cache@v5
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
cypress-${{ runner.os }}-
- run: npm ci
- name: Record performance baseline
run: npm run test:integration:record
env:
CYPRESS_PERF_BROWSER: chrome
- name: Compare against baseline (no regressions expected)
run: npm run test:integration:compare
env:
CYPRESS_PERF_BROWSER: chrome
- name: Upload perf report
if: always()
uses: actions/upload-artifact@v7
with:
name: perf-report
path: cypress/integration-reports/perf-report.html
if-no-files-found: ignore