Skip to content

Commit b911fd2

Browse files
committed
ci: concise cost-map drift failure + accurate Node comment
- cost-map-sync: use diff -q with an actionable ::error:: message instead of dumping the full ~700-line cost map on mismatch. - publish-npm: drop the specific vitest-4 reference (not on main yet); Node 22 is just the current LTS for the JS toolchain.
1 parent 804d264 commit b911fd2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ jobs:
4040
with:
4141
persist-credentials: false
4242
- name: Python and JS cost maps must match
43-
run: diff src/floe_guard/cost_map.json js/src/cost_map.json
43+
# -q keeps the failure concise (the map is ~700 lines); the message says
44+
# what to do rather than dumping the whole diff.
45+
run: |
46+
diff -q src/floe_guard/cost_map.json js/src/cost_map.json \
47+
|| { echo "::error::cost_map.json drifted between src/floe_guard/ and js/src/ — re-sync the two copies."; exit 1; }
4448
4549
test:
4650
runs-on: ubuntu-latest

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3333
with:
34-
# Node 22: satisfies the test toolchain (vitest 4 / vite need >=20.19).
34+
# Node 22: current LTS, comfortably covers the JS toolchain (Vite/Vitest).
3535
node-version: '22'
3636
registry-url: 'https://registry.npmjs.org'
3737

0 commit comments

Comments
 (0)