Skip to content

check

check #21

Workflow file for this run

# The merge gate. `bun run check` is what the repository already calls the gate
# (AGENTS.md); this only makes it run where nobody can forget to.
#
# The gate is split across parallel jobs because it was one sequential run
# where the slowest step held every other step behind it. The steps are
# independent processes sharing no state. Keep this matrix and the `check:*`
# shards `bun run check` names in step.
name: check
# Automatic triggers are off on this branch while the Actions account is
# unbilled — every run died at runner provisioning. Still runnable by hand.
on:
workflow_dispatch:
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
shard:
name: check (${{ matrix.shard }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
# One shard's failure should not hide the others' results.
fail-fast: false
matrix:
shard: [static, build]
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
# An optimisation, not a correctness boundary: `vendor-build` rebuilds a
# restored tree its digest disagrees with. Every shard shares the key, so
# a miss has each rebuild only what moved and offer a save the cache keeps
# once — cheaper than a serial build job in front of every run.
- uses: actions/cache@v4
with:
path: vendor/interchange/packages/*/dist
key: >-
vendor-dist-${{ runner.os }}-${{ hashFiles('vendor/interchange/VENDORED_REVISION',
'scripts/vendor-build.ts', 'vendor/interchange/bin/dist-rewrite.ts',
'vendor/interchange/packages/*/src/**') }}
restore-keys: vendor-dist-${{ runner.os }}-
# postinstall builds the vendored Interchange packages.
- run: bun install --frozen-lockfile
- run: bun run check:${{ matrix.shard }}
# The single required status check: green only when every shard is.
check:
name: check
needs: shard
if: always()
runs-on: ubuntu-latest
steps:
- name: Every shard passed
if: needs.shard.result != 'success'
run: |
echo "::error::the check matrix did not pass (${{ needs.shard.result }})"
exit 1