Commit b0231ea
ci: add metadata test/lint gates (vitest + validate); fix broken lint step (#367)
CI called `pnpm run lint` but the repo had no `lint` script, so the
"Build and Test" workflow failed at the lint step on every commit
(pre-existing, also red on main). Aligns the scripts/CI with the
@objectstack metadata-app conventions (see framework examples).
package.json scripts:
- validate: `objectstack validate` — protocol/schema gate (blocking).
- lint: `objectstack lint --skip-i18n` — metadata conventions (advisory).
- test: `vitest run` — structural metadata smoke test (was the no-op
`objectstack test`, which needs qa/*.test.json + a live server →
kept as `test:qa`).
- verify: validate && typecheck && build && test.
test/smoke.test.ts (vitest, no server — mirrors framework app-crm):
asserts manifest, core objects, all 16 flows incl. the 6 workflows[]-migrated
ones, and guards the 7.7 migration (no object `workflows[]`; every notify
`severity` ∈ info|warning|critical).
CI (ci.yml + code-quality.yml): blocking gates are now
validate + typecheck + build + test; `objectstack lint` runs advisory
(`continue-on-error`) because its `required/label` rule false-positives on
standard list-views (checks top-level `view.label`, but the view schema only
supports `list.label`) — filed upstream.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 814ff84 commit b0231ea
6 files changed
Lines changed: 712 additions & 79 deletions
File tree
- .github/workflows
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
0 commit comments