Add build and dist/ freshness check to CI

The CI workflow only ran tests without rebuilding dist/, so dependency
updates (e.g. from Dependabot) would be merged with stale compiled JS
built from the previous toolchain. Now CI rebuilds and fails if dist/
is out of date.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jarek Potiuk 2026-04-09 17:56:12 +03:00
parent f099b44166
commit dd2390abf0
No known key found for this signature in database

View file

@ -21,5 +21,16 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Check dist/ is up-to-date
run: |
if [ -n "$(git diff --name-only)" ]; then
echo "::error::dist/ is out of date. Run 'npm run build' and commit the changes."
git diff --name-only
exit 1
fi
- name: Run tests
run: npm test