AI Hints
Home›CI/CD with GitHub Actions Tutorial›Fast Feedback and Node.js
CI/CD with GitHub Actions · Lesson 64 of 138

Fast Feedback

Minutes, not hours.

⏱ 2 min read▶ Video at 1:13:01🎓 Free
Watch this lesson in the CI/CD with GitHub Actions courseWatch on YouTube ↗Full CI/CD with GitHub Actions course

The point of CI is fast feedback. If the pipeline takes an hour, people stop waiting for it, start new work, and forget the context. Aim for about ten minutes or less, for checks on a pull request.

Fast Feedback
From the video: Fast Feedback
  • CI means fast feedback
  • An hour is too slow
  • Aim for ten minutes

Order the gates by speed

Put the fastest checks first. Linting and formatting take seconds, and catch lots of problems. Then unit tests, in a minute or two. Then slower integration tests. And only then, building and deploying. A cheap failure early saves an expensive run later.

  1. Lint (seconds)
  2. Format (seconds)
  3. Unit tests (minutes)
  4. Integration tests
  5. Build and deploy
Order the gates by speed
From the video: Order the gates by speed

Ways to go faster

Cache dependencies. Run independent jobs in parallel. Skip work with path filters. Split a big test suite into shards, across a matrix. And cancel out of date runs with concurrency. Each of these alone can save minutes, on every single run.

keyvalue
Cachedependencies
Parallelindependent jobs
Filtersskip unneeded runs
Shardssplit slow tests

Summary

Fast feedback keeps CI useful. Order the gates by speed, and use caching, parallel jobs, and filters. Next, a pipeline for a Node project.

Key takeaways
  • Under ten minutes
  • Fast gates first
  • Cache, parallel, filter
Next up: A Node.js Pipeline — JavaScript projects