CI does not need to be elaborate to be valuable. For a small Laravel team, a first pipeline is four jobs that run on every pull request, and its real product is a green checkmark everyone trusts.
The four jobs#
- Install:
composer installandnpm ci. If dependencies cannot install cleanly from the lockfiles, nothing else matters - this is why the lockfiles are committed. - Lint:
./vendor/bin/pint --testfails the build on style drift, so style stops being a code review topic. - Test:
php artisan testagainst a throwaway database (SQLite in memory is enough for a first pipeline). - Build:
npm run buildproves the frontend compiles - the failure you do not want to meet at deploy time.
Any pipeline runner can express this: GitHub Actions, GitLab CI, or the CI your self-hosted setup provides. The shape is the same everywhere: checkout, cache the composer/npm directories, run the four jobs.
Make the check required#
A pipeline nobody is forced to wait for becomes decoration within a month. Wire it into branch protection: pull requests cannot merge until CI is green. That single setting is the difference between “we have CI” and “CI has us” - and it is what lets small PRs move quickly, because reviewers see the robot’s verdict before they spend their own attention.
Keep it boring and fast#
Two traps make teams abandon CI:
- Slow runs. Cache dependencies, and resist running the full browser-test suite on every push - that belongs in a nightly job. A PR pipeline that answers in under five minutes gets respected; one that takes forty gets bypassed.
- Flaky tests. A test that fails randomly teaches everyone to click “re-run” without looking, which is worse than no test. Quarantine flakes the week they appear.
What not to automate yet#
Deploys. The first pipeline stops at the green checkmark on the PR; deployment stays a deliberate human act until the test suite earns more trust. When that day comes, the pipeline’s final job is a tag, and Deploy With Tags, Not Branches takes it from there.
Four jobs, one required check, five minutes. That is the whole first pipeline - everything after is refinement.
Share this post
Keep reading
A Staging Environment Worth Having
Staging only catches what it shares with production. Same deploy path, same services, sanitized data - and a clear rule for what it is for.
Branch Naming Conventions That Scale Past Three People
Branch names are a user interface for your team's work. The conventions that survive growth, the ones that collapse, and why boring always wins.
Branch Protection Rules That Stick
Three rules cover most of the risk on main: review required, tests green, no force-push. More than that tends to get routed around.