Skip to content

Commit 72316eb

Browse files
authored
Update build-and-test.yml
1 parent 4b76e03 commit 72316eb

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ jobs:
110110

111111
- name: Build
112112
run: npm run build
113+
114+
- name: Verify dist/ matches src/
115+
run: |
116+
if ! git diff --quiet dist/; then
117+
echo "::error::dist/ is out of sync with src/. The husky pre-commit hook should have rebuilt dist/ before commit. Did you commit without running 'npm install' first (which wires up the hook), or bypass hooks with --no-verify?"
118+
echo "--- dist/ diff ---"
119+
git diff --stat dist/
120+
git diff dist/ | head -100
121+
exit 1
122+
fi
123+
echo "dist/ matches src/ ✓"
113124
114125
- name: Lint
115126
run: npm run lint

0 commit comments

Comments
 (0)