-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.87 KB
/
ci.yml
File metadata and controls
54 lines (45 loc) · 1.87 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
name: ci
# Runs on every PR and on every push to main. Pure quality gate — does NOT
# deploy. Railway auto-deploys main from its own GitHub integration; Vercel
# does the same for apps/dashboard. CI's job is to fail the merge button
# before bad code reaches either deploy target.
on:
push:
branches: [main]
pull_request:
# Cancel in-progress runs for the same PR/branch when a new commit lands —
# saves CI minutes and gives faster feedback.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: typecheck + tests + dashboard build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
# Node 22.6+ — the .mts test files in apps/browser-ext, apps/vscode-ext,
# and packages/score-card use `--experimental-strip-types`, which was
# introduced in 22.6.0. (Node 23.6.0 makes stripping default.)
node-version: '22'
cache: npm
# `npm ci` is faster + stricter than `npm install` and respects
# package-lock.json exactly. Required for reproducible CI.
- name: install
run: npm ci
# Fans out to every workspace's `typecheck` script. Skips workspaces
# that don't define one (--if-present is set in the root scripts).
- name: typecheck
run: npm run typecheck
# Runs every workspace's `test` script. None of these tests hit the
# live API — they're unit + bundle-load + CLI smoke tests. Total
# runtime is ~10s, so we don't bother splitting the matrix.
- name: test
run: npm test
# Production-build the dashboard so PRs can't break the Vercel deploy
# without showing red here first. Builds the same way Vercel does.
- name: build dashboard
run: npm --workspace=apps/dashboard run build