Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
3230db654This file is pinned to the selected release. Download the original to open it in your design tool.
name: Web CI
# Lint + build the Next.js site so broken code can't reach main.
# Only runs when something under web/ (or this workflow) changes.
on:
pull_request:
paths:
- "web/**"
- ".github/workflows/web-ci.yml"
push:
branches: [main]
paths:
- "web/**"
- ".github/workflows/web-ci.yml"
# Cancel an in-progress run if newer commits are pushed to the same ref.
concurrency:
group: web-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: npm ci
# Lint is a hard gate: lint errors can't reach main (warnings still pass).
- name: Lint
run: npm run lint
# `next build` type-checks only what it bundles; scripts/ and the smoke
# suites are outside that, and a type error there used to surface as a
# crash the first time somebody ran the script.
- name: Typecheck
run: npm run typecheck
# Build is the hard gate: broken code can't reach main.
- name: Build
run: npm run build
# The smoke suites. Twenty of them existed and CI ran two; the rest ran
# when somebody remembered. `check:ci` is every suite that needs nothing
# a runner lacks (the module builder wants the Xtensa toolchain, so
# `check:module` stays local).
- name: Smoke suites
run: npm run check:ci