DevOpsCI/CD pipelinesLesson 60 / 69

Run tests on every push

Exercise35 min

Run tests on every push

Tests that only run on your laptop are tests that only run sometimes. Wire them into CI and they run always:

- run: npm ci
- run: npm run build
- run: npm test
- run: npm run test:e2e   # with a postgres service running

The ordering rule: cheapest first (lint), slowest last (e2e). A workflow that fails fast saves the whole team's minutes. And the badge in your README becomes a live promise: this branch's tests are green, right now.

Exercise

In this repo's backend workflow, reorder the steps for fail-fast efficiency. Justify the order in one sentence per step.

Practice in the diagram lab

This lesson's practice belongs in the diagram editor — design the schema you just read about, grade it against the solution, and save it to your account.

Open the diagram lab