Continuous integration sounds like enterprise ceremony until the day it saves you from yourself. Mine was a Friday evening push that broke the production build β caught not by me, but by a little red X next to the commit, before I merged anything. That red X is the whole point: a robot that checks your work on every push, so "works on my machine" stops being a thing you say out loud.
GitHub Actions is the easiest way to get that robot, and you do not need to understand YAML deeply to use it. You need one file. Let us build it together and then pull apart what each line does.
The one-file setup
In your repository, create .github/workflows/ci.yml :
name : CI
on : push : branches : [ main ] pull_request :
jobs : test : runs-on : ubuntu-latest steps : - uses : actions/checkout@v4
- uses : actions/setup-node@v4 with : node-version : 22 cache : npm
- run : npm ci - run : npm run lint - run : npm test - run : npm run build
Enter fullscreen mode
Exit fullscreen mode
Push that file, open the Actions tab inβ¦