Repository navigation
109 lines (87 loc) · 3.27 KB
/
Copy pathci.yml
File metadata and controls
109 lines (87 loc) · 3.27 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches-ignore:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: 'npm'
cache-dependency-path: |
package-lock.json
e2e/fixtures/*/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Versions agree (llms.txt, CLAUDE.md, CHANGELOG vs package.json)
run: npm run check:versions
- name: React Compiler baseline (no new CompileError or skip)
run: npm run check:compiler
- name: Type-check (lib, tests, demo, e2e)
run: npm run typecheck
- name: Unit tests
run: npm test -- --maxWorkers=4
- name: Resolve Playwright version
id: playwright
run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
# The Ubuntu mirror behind --with-deps sometimes stalls (PRs #15, #16, #17). apt retries
# stalled downloads and waits for the dpkg lock; each attempt gets 6 minutes, and the
# root apt-get that timeout cannot reach is stopped before the next one.
timeout-minutes: 20
run: |
printf 'Acquire::Retries "5";\nAcquire::http::Timeout "30";\nDPkg::Lock::Timeout "120";\n' \
| sudo tee /etc/apt/apt.conf.d/80-ci-retries > /dev/null
for attempt in 1 2 3; do
timeout 6m npx playwright install --with-deps chromium firefox webkit && exit 0
echo "Playwright install attempt $attempt stalled or failed, retrying"
sudo pkill -9 -x apt-get || true
sudo dpkg --configure -a || true
done
exit 1
- name: Install Playwright system dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium firefox webkit
- name: Browser tests
run: npm run test:browser
- name: Build library (fails if React is bundled)
run: npm run build:lib
- name: Package contents and size budget (no test artifacts; DataGrid alone within budget)
run: npm run check:package
- name: Package smoke suite (packed tarball in React 18 and 19 apps)
run: npm run test:smoke -- --skip-lib
- name: Demo-site smoke test (builds the demo, loads every route)
run: npm run test:demo
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
playwright-report/
test-results/
retention-days: 14
if-no-files-found: ignore