From dd2390abf09c20807c1185d4fd0cd47b2775d541 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Thu, 9 Apr 2026 17:56:12 +0300 Subject: [PATCH] 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) --- .github/workflows/unit-tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 1511ed9..7f4a17b 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -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