perf(ci): reduce test redundancy from 4x to 1x per release

- Remove tests from pre-commit hook (keep typecheck+lint only)
- Remove build+validate from prepublishOnly/prepack (CI handles it)
- Add HUSKY=0 to CI commit step to skip hooks

Before: 4 test runs per release (pre-commit, CI validate, prepublishOnly, prepack)
After: 1 test run (CI validate only)
This commit is contained in:
kaitranntt
2025-12-12 16:11:06 -05:00
parent 76f358d65b
commit d39095c7d6
3 changed files with 8 additions and 5 deletions
+2
View File
@@ -156,6 +156,8 @@ jobs:
done
- name: Commit version bump
env:
HUSKY: 0
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
+4 -3
View File
@@ -1,7 +1,8 @@
# Run validation before commit (typecheck + lint + format + tests)
bun run validate
# Run quick checks before commit (typecheck + lint + format only)
# Tests are run by CI - no need to duplicate locally
bun run typecheck && bun run lint:fix && bun run format:check
# Validate UI if changes detected
# Validate UI if changes detected (typecheck + lint only)
if git diff --cached --name-only | grep -q "^ui/"; then
echo "[i] UI changes detected, running ui:validate..."
bun run ui:validate
+2 -2
View File
@@ -74,8 +74,8 @@
"ui:build": "cd ui && bun run build",
"ui:preview": "cd ui && bun run preview",
"ui:validate": "cd ui && bun run validate",
"prepublishOnly": "bun run build:all && bun run validate && node scripts/sync-version.js",
"prepack": "bun run build:all && bun run validate && node scripts/sync-version.js",
"prepublishOnly": "node scripts/sync-version.js",
"prepack": "node scripts/sync-version.js",
"prepare": "husky",
"postinstall": "node scripts/postinstall.js"
},