Repository navigation
78 lines (65 loc) · 1.86 KB
/
Copy pathci.yml
File metadata and controls
78 lines (65 loc) · 1.86 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
name: CI
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
pull_request:
paths-ignore:
- "**/*.md"
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
include:
- node-version: 20
browser: chromium
- node-version: 22
browser: chromium
- node-version: 24
browser: chromium
- node-version: 24
browser: firefox
- node-version: 24
browser: webkit
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Install Playwright browser
run: npx playwright install --with-deps ${{ matrix.browser }}
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Run tests
if: matrix.node-version != 24 || matrix.browser != 'chromium'
run: npm run test:browser -- --project=${{ matrix.browser }} --workers=4
- name: Run tests with coverage
if: matrix.node-version == 24 && matrix.browser == 'chromium'
run: npm run test:coverage -- --workers=4
- name: Upload coverage to Codecov
if: matrix.node-version == 24 && matrix.browser == 'chromium'
uses: codecov/codecov-action@v7
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: ./coverage/lcov.info
- name: Verify generated bundles are current
run: git diff --exit-code -- dist
- name: Validate package contents
run: npm pack --dry-run