10 / 48 · 16 CI/CD Pipelines · GitHub Actions: A Practical Example← prev⊞ allnext →☰ Read as one page
2.5Hands-On Exercise
- Fork a simple Node.js project (or create one with
npm init) - Add the test pipeline from this file to
.github/workflows/test-pipeline.yml - Simplify it: start with just the
unit-testsjob - Push and watch the Actions tab -- verify the pipeline triggers and produces artifacts
- Add
integration-testswith a Postgres service - Add a matrix strategy for browser tests
- Intentionally break a test and verify artifacts are uploaded on failure
- Add path filtering and Slack notifications
Build the pipeline incrementally. Do not try to write the entire configuration at once -- you will spend more time debugging than building.