-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (61 loc) · 2.36 KB
/
Copy pathcheck.yml
File metadata and controls
65 lines (61 loc) · 2.36 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
59
60
61
62
63
64
65
# 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