-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1011 Bytes
/
Copy pathformat-check.yml
File metadata and controls
35 lines (31 loc) · 1011 Bytes
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
# vendor-kit: format-check@532ab00f3fa5 — generated; edit packages/km-infra/vendor-kit/templates/format-check.yml in km, then re-sync
name: format-check
# Per-push formatter-idempotency gate — asserts the formatter produces a clean
# tree against HEAD, so non-idempotent formatter regressions are caught before
# they pollute downstream consumers.
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: format-check-${{ github.ref }}
cancel-in-progress: true
jobs:
format-check:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.13
- run: bun install --frozen-lockfile
- name: Format and assert clean tree
run: |
bunx oxfmt .
if ! git diff --quiet; then
echo "::error::formatter produced changes — run bunx oxfmt . and commit"
git diff --stat
exit 1
fi