logo
podcast Podcast
get help Get Unstuck

The importance of running CI checks locally

Don't wait for some remote pipeline to catch your mistakes

Joel Clermont
Joel Clermont
2024-07-12

CI pipelines are a great way to enforce quality checks on your project. But I think they should be viewed as one of the final gates before release, not one of the first gates to catch something.

Why do I say that?

Running a CI check takes time and resources. Why push up your code, wait for it to run, see an error, then fix and repeat?

It's much better to run the quality checks locally before even pushing the branch up to be reviewed.

I'm not suggesting you should try to get your actual CI pipeline running locally. Instead, you can just run the same basic checks that the pipeline will run.

As a bonus, I even specify a ci script in my composer.json, which is run both by the actual pipeline, and by me locally.

Now, it has become muscle memory to run composer ci before pushing up a branch. I get my feedback more quickly and I don't burden the pipeline with unnecessary executions.

Here to help,

Joel

P.S. The Mastering Laravel community is a great place to learn from others and also share what you know.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice you can use.