Skip to main content
CodeOath
← All posts

CI/CD & DevOps65 min total · 17 parts

CI/CD Pipelines Explained: From Push to Production

Part 9 of 17 · ~1 min

Testing in CI: What Runs, and When

Once the nightly schedule trigger exists, the team has to actually decide what runs where, and the honest answer is that a check earns a different spot in the pipeline depending on how fast it is and how much it can be wrong about:

LayerChecksRoughly how fastWhen it runs
UnitThe receipt-total math, currency rounding, one function at a time, nothing real behind itA few seconds, the whole suiteEvery push, every PR
Integrationworker actually talking to a real Redis and a real Postgres, wired the way Compose wires them locallyFifteen to thirty secondsEvery push to main, alongside the build
End-to-endA real browser uploading a real receipt image and watching a row appear in the UIThree to five minutes, and it flakes occasionally on a slow screenshot comparisonNightly only, via the schedule trigger

The blind spot this table is honest about showing up almost immediately: two weeks in, someone renames a CSS class on the upload button as part of an unrelated cleanup. Unit tests don't touch the DOM at all, so they're green. Integration tests hit worker directly over its API and never open a browser, so they're green too. The only thing that would have caught it is the one check running once a night — and it does, the next morning, which is a full workday later than a push-triggered check would have been. That's the actual trade being made by keeping E2E off every push: real coverage, on a real delay, in exchange for not making every commit wait three to five minutes for a browser to screenshot a button.