mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 14:05:49 +00:00
ci(limits): enforce numeric inventory drift on documentation changes (#12881)
* ci(limits): enforce numeric inventory drift on documentation changes * fix(ci): invalidate cached lint when limits inventory changes
This commit is contained in:
1 parent
c2c8ad3d70
commit
aaf151f5d6
3 files changed
+5
-18
No files matched your search
@@ -1149,6 +1149,10 @@ jobs:
|
||||
- run: npm ci
|
||||
- name: Reuse portable build outputs across runs
|
||||
uses: ./.github/actions/portable-build-cache
|
||||
# Code changes already run this verifier through the required lint lane.
|
||||
- name: Check documented numeric limits
|
||||
if: needs.changes.outputs.code != 'true'
|
||||
run: node scripts/verify/rea-numeric-limits.mjs
|
||||
- run: npm run docs:check
|
||||
- name: Verify published routes, source links and local anchors
|
||||
run: npm run verify:docs:routes
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { expect, it } from "vitest";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import {
|
||||
compareDocumentedNumericLimits,
|
||||
discoverNumericLimitUses,
|
||||
documentedLimitCell,
|
||||
loadExportedNumericLimitBounds,
|
||||
parseDocumentedNumericLimits,
|
||||
parseNumericLimitRegistry,
|
||||
parseRuntimeSettingEnvironments,
|
||||
@@ -639,19 +637,3 @@ it("names a documented limit the code does not export", () => {
|
||||
'REA_FIXED: documented Restart-only numeric limits default "30", floor "30", maximum "30", but code exports no bound',
|
||||
]);
|
||||
});
|
||||
|
||||
it("matches the inventory to the exported analysis settings and owner bounds", async () => {
|
||||
const inventory = await readFile(
|
||||
new URL("../../docs/reference/rea-limit-inventory.md", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
const exported = await loadExportedNumericLimitBounds();
|
||||
expect(exported.failures).toEqual([]);
|
||||
expect(
|
||||
compareDocumentedNumericLimits(
|
||||
parseDocumentedNumericLimits(inventory),
|
||||
exported.bounds,
|
||||
exported.names,
|
||||
),
|
||||
).toEqual([]);
|
||||
});
|
||||
@@ -86,6 +86,7 @@
|
||||
"src/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
|
||||
"tests/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
|
||||
"docs/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
|
||||
"docs/reference/rea-limit-inventory.md",
|
||||
".github/actions/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
|
||||
"website/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}",
|
||||
"src/**/*.{json,md,py,yaml,yml}",
|
||||
|
||||
Reference in new issue
Block a user