SeniorCI/CD & DevOps for QA
How do you structure a CI pipeline for a monorepo with multiple services?
- monorepo
- pipeline structure
- optimization
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Key principles: (1) Only build and test what changed, use file path filters or tools like Nx/Turborepo to detect affected projects. (2) Shared CI steps for common operations (linting, type checking). (3) Parallel jobs per service for independent build/test. (4) Dependency-aware ordering: if service A depends on library B, test B first. (5) Caching: node_modules, build artifacts, Docker layers. (6) Selective deployment: only deploy changed services. Tools: GitHub Actions path filters, Nx affected commands, Bazel for large monorepos.
What interviewers listen for
- Pipeline shapeYou design stages by failure cost and runtime budget, not by tool feature lists.
- Parallelisation craftYou can shard a real suite and explain the state-isolation choices you made.
- Quality gatesYou know which checks block merge, which warn, and why those defaults are correct.
- Shift-left fluencyYou talk about ownership transfer, not just earlier execution.