technique
stage: deliver
2 min read
CI pipelines that stay fast
A pipeline people trust is fast, deterministic and clear when it fails. A slow or flaky one trains the team to ignore it.
GitHub ActionsGitLab CIBuildkiteBuildKit cacheRenovateact (run workflows locally)
Anatomy
- Trigger: a push, a pull request, a tag or a schedule.
- Jobs run on fresh runners; each job is isolated, so share data through artifacts and caches, not through the machine.
- Stages order the work: lint and unit tests first (fast, cheap), then integration tests, then build and publish the artifact.
- Gates: required checks must pass before merge.
- Environments and approvals guard deployment to sensitive targets.
A pipeline example
Fail fast with cheap checks, run independent jobs in parallel, cache dependencies, cancel superseded runs, and keep permissions minimal.
name: ci
on:
pull_request:
push: { branches: [main] }
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@<full-commit-sha>
- uses: actions/setup-node@<full-commit-sha>
with: { node-version: 22, cache: npm }
- run: npm ci
- run: npm run lint && npm test
build:
needs: lint-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@<full-commit-sha>
- run: docker build -t app:${{ github.sha }} .Keeping it fast and reliable
- Cache dependencies and build layers, keyed on the lockfile.
- Run tests in parallel and split slow suites; quarantine flaky tests and fix them, never retry blindly.
- Set timeouts so a hung job does not hold the queue.
- Make builds reproducible: pinned tools, lockfiles, no network surprises.
- Treat the pipeline as production code: review it, test changes, and give it (see the Security engineering domain).
Reading a failure
A failing job should say what broke in its first screen. Print the failing test and the command that reproduces it locally. If people need to ask "why is CI red?", the pipeline is missing information.
connections on the map
- Git workflows and code reviewtriggersCI pipelines that stay fast
- The delivery lifecycleis automated byCI pipelines that stay fast
- CI pipelines that stay fasthands artifacts toRelease strategies and rollback
updated on 14/10/2026 · sources to go deeper · report an error
in other domains
- CI/CD hardeningsecenga pipeline that works must also be a trustworthy pipeline
- CI/CDappsecwhere each security check fits in the pipeline
Study before
Unlocks
test what you learned
Loading questions…