CI/CD & GitHub Actions (50 Qs)•Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)
Monorepo CI Optimization: Path filtering (`paths` / `paths-ignore`) vs tooling like Nx and Turborepo.
senior LevelCode ExamplePerformance
In Simple Words: In repositories containing multiple frontend apps and backend microservices, running all tests on every commit causes multi-hour pipeline queues.
- GitHub Actions Native
pathsFilter: Skips entire workflows if commits only touch unrelated directories. - Affected Graph Tooling (Nx / Turborepo): Calculates git difference against base branch (
git diff --name-only main), computes dependency graphs, and executes tasks only on affected packages while reusing remote computation cache.
bash
# Run tests only on projects affected by current PR
npx turbo run test --filter=...[origin/main]