-
Notifications
You must be signed in to change notification settings - Fork 17
77 lines (61 loc) · 2.05 KB
/
Copy pathtest.yml
File metadata and controls
77 lines (61 loc) · 2.05 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
# CI test workflow. Runs on every PR + push to main.
#
# Runs the full ./run-tests.sh battery:
# - Node-side tests (native-dialog guard, lens-local-utils, dev-server
# origin guard)
# - Playwright-driven web-app suite
# - Cold mobile-load resource budgets
# - Focused Firefox smoke coverage for critical browser flows
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Run typecheck
run: npm run typecheck
- name: Run checkJs pilot
run: npm run typecheck:checkjs
- name: Verify architecture map and boundaries
run: npm run architecture:check
- name: Run quality guardrails
run: npm run quality
- name: Cache Playwright browsers
uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
playwright-browsers-${{ runner.os }}-
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium firefox
- name: Resolve catalog file (fetch from private source if creds set, else use stub)
env:
CATALOG_FETCH_URL: ${{ secrets.CATALOG_FETCH_URL }}
CATALOG_FETCH_TOKEN: ${{ secrets.CATALOG_FETCH_TOKEN }}
run: node scripts/fetch-catalog.mjs
- name: Run Firefox smoke suite
run: npm run test:firefox
- name: Run test suite with coverage ratchet
run: COVERAGE=1 SKIP_TYPECHECK=1 ./run-tests.sh
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-logs
path: /tmp/dev-server.log
if-no-files-found: ignore
retention-days: 7