mirror of
https://github.com/hanzoai/swc.git
synced 2026-10-30 19:42:53 +00:00
## Summary - optimize only the cargo-test matrix in CI using cargo mono changed - keep full matrix for push to main - when no crates are affected: run full matrix on infra changes, otherwise run a single __noop__ entry - add safe fallback to full matrix if cargo mono changed fails ## Changes - update .github/workflows/CI.yml - list-cargo-tests: add fetch-depth: 0 and install [email protected] - cargo-test: add noop step and guard expensive steps with crate != __noop__ - update scripts/github/get-test-matrix.mjs - use GitHub env (GITHUB_EVENT_NAME, GITHUB_BASE_REF, GITHUB_REF) - full matrix on push to main - otherwise compute changed crates via cargo mono --output json changed --base origin/<base> - add infra-path fallback and noop sentinel output ## Verification - node --check scripts/github/get-test-matrix.mjs - git diff --check -- .github/workflows/CI.yml scripts/github/get-test-matrix.mjs