Repository navigation
68 lines (56 loc) · 2.24 KB
/
Copy pathcode-quality.yml
File metadata and controls
68 lines (56 loc) · 2.24 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
66
67
68
name: Code Quality
on:
pull_request:
branches: [ main, develop ]
paths:
- '**.ts'
- '**.js'
- '**.mjs'
- '**.json'
- '**.yml'
- '**.yaml'
jobs:
quality-check:
name: Quality Checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '22.x'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Replaces three inline greps that scanned `packages/` — a directory this
# repo does not have — each with `continue-on-error: true`. The script
# scans this repo's first-party files and fails on a hit; it also fails
# loudly, each guard with its own message, when a directory or a root
# file it is told to scan has gone missing, so the check can never
# silently go vacuous again. It prints the surface it actually reads on
# every run — read that banner; every copy of it kept here has gone stale.
- name: Source hygiene (scripts/check-source-hygiene.mjs)
run: node scripts/check-source-hygiene.mjs
# Shrink-only ceiling on the authored surface, in estimated tokens
# (#1183) — the gate behind the README's context-window claim. The same
# step runs in `CI`, which has no `paths:` filter; this copy keeps the
# measurement visible in the review-facing Quality Checks output.
- name: Source token ratchet (authored surface, only-down)
run: node scripts/check-source-token-ratchet.mjs
- name: Check TypeScript compilation
run: pnpm run typecheck
- name: Validate metadata (protocol/schema)
run: pnpm run validate
# `pnpm run lint` is `objectstack lint --strict` (#1581): an error OR a
# warning fails this step, and suggestions stay advisory. Without the
# flag only errors fail. `continue-on-error` was suppressing nothing but
# the findings we actually want to hear about.
- name: Lint metadata conventions
run: pnpm run lint