-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 2.03 KB
/
ci.yml
File metadata and controls
58 lines (53 loc) · 2.03 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- name: Verify OpenAPI spec is in sync with live API
run: |
bun run generate
git diff --exit-code -- specs/openapi.json packages/ui/src/types/ \
|| { echo "::error::OpenAPI spec or generated types are stale. Run 'bun run generate' locally and commit."; exit 1; }
- run: bun run check
- name: Brand-rule grep
run: bun run scripts/brand-grep.ts
- run: bun run typecheck
- run: bun run build
- run: bun run test
- name: Provision Playwright browsers from MCR image (bypass cdn.playwright.dev)
# cdn.playwright.dev browser-binary downloads stall from GitHub runners.
# Pull the exact matching browsers from the official Playwright image on
# Microsoft Container Registry, then copy them into the default browser
# cache. install-deps is apt-only (no CDN download). Keep the image tag
# in lockstep with @playwright/test in package.json (currently 1.59.1).
run: |
bunx playwright install-deps chromium
docker create --name pwbrowsers mcr.microsoft.com/playwright:v1.59.1-noble
mkdir -p "$HOME/.cache/ms-playwright"
docker cp pwbrowsers:/ms-playwright/. "$HOME/.cache/ms-playwright/"
docker rm pwbrowsers
ls -1 "$HOME/.cache/ms-playwright"
- run: bun run test:e2e
env:
PLAYWRIGHT_PROJECTS: chromium
- name: UI audit (no [object Object], no empty-state drift)
run: |
bun run preview &
PREVIEW_PID=$!
for i in $(seq 1 30); do
curl -sf http://localhost:3001 > /dev/null && break
sleep 1
done
bun run audit
AUDIT_EXIT=$?
kill $PREVIEW_PID 2>/dev/null || true
exit $AUDIT_EXIT