-
Notifications
You must be signed in to change notification settings - Fork 106
73 lines (59 loc) · 1.8 KB
/
Copy pathtest.yml
File metadata and controls
73 lines (59 loc) · 1.8 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
name: Test & Lint
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Build
run: npm run build
- name: Check bundle size
run: npm run size
- name: Verify Exports
run: npm run test:exports
- name: Run tests
run: npm test
# Accessibility audit runs once (not per Node version matrix entry)
# to avoid redundant browser automation.
- name: Install matching chromedriver
if: matrix.node-version == '22.x'
run: npx browser-driver-manager install chrome
- name: Start demo app
if: matrix.node-version == '22.x'
run: |
npx vite --port 4173 --strictPort &
for i in $(seq 1 30); do
curl -sf http://localhost:4173/ > /dev/null && break
sleep 1
done
- name: Run accessibility audit (axe)
if: matrix.node-version == '22.x'
run: |
npx axe http://localhost:4173 \
--save axe-results.json \
--chrome-options="headless=new,no-sandbox,disable-dev-shm-usage" \
|| true
node scripts/check-axe-critical.mjs axe-results.json
- name: Upload axe results
if: always() && matrix.node-version == '22.x'
uses: actions/upload-artifact@v4
with:
name: axe-results
path: axe-results.json