Files

45 lines
1.3 KiB
YAML

# GOLDEN CI FLOOR — pnpm. See dotfiles/templates/ci/README.md.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# A newer push makes the older run obsolete — don't waste minutes finishing it.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
# pnpm version comes from "packageManager" in package.json (SSOT);
# pnpm/action-setup@v6 errors if both are specified.
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
# Node 24 is the fleet toolchain (pnpm 11 needs >= 22.13); engines still allow >= 20 for consumers.
node-version: 24
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
# SSOT: "verified" is defined ONCE, in package.json `verify`
# (= build + test), and run identically here and locally. Change the
# checks in one place, not two.
#
# `pnpm test` here also exercises the package's `exports` map, because the
# tests import it BY NAME rather than reaching into dist/ — so a broken
# exports/files map fails here rather than at a consumer's install.
- name: Verify
run: pnpm run verify