perf(ci): optimize CI build efficiency and remove redundant builds

This PR optimizes the CI/CD pipeline by enabling parallel workspace builds in CI and removing redundant `posttest` scripts that triggered unnecessary builds after testing.

### Changes:
- **Enable Parallel CI Builds**: Updated `scripts/build.js` to use the same parallelization logic in CI as it does for local development. This leverages multi-core runners more effectively.
- **Remove Redundant Builds**: Stripped `posttest: npm run build` from the root `package.json`, `packages/cli/package.json`, and `packages/core/package.json`. These packages were triggering full rebuilds after every test shard, even though the CI workflow explicitly runs a build step before testing.

### Impact:
- **Reduced CI Runtime**: Significant reduction in total Actions minutes by eliminating multiple redundant build cycles.
- **Lower Costs**: Expected to decrease GitHub Actions spend (recent metrics showed a +109% spike in spend, partly due to these inefficiencies).
- **Faster Feedback**: PRs will complete validation faster, improving developer productivity.
This commit is contained in:
gemini-cli[bot]
2026-05-14 16:20:55 +00:00
parent b705505dae
commit 97f01af2e4
4 changed files with 18 additions and 26 deletions
-1
View File
@@ -16,7 +16,6 @@
"format": "prettier --write .",
"test": "vitest run",
"test:ci": "vitest run",
"posttest": "npm run build",
"typecheck": "tsc --noEmit"
},
"files": [