Rather than pushing the code to a remote branch and then testing via Circle CI servers, it is best to run the tests locally first and make them work. Here’s how you can do that.
- Install
circleci
CLI (On Mac, that would bebrew install circleci
) - Write/modify the config in
.circleci/config.yml
- Validate config with
circleci config validate
- Test the job by running
circleci local execute
to execute all jobs orcircleci local execute --job <job-name>
to run a specific job. And once that passes, push the code. - Now enable Circle CI on the repo.
- Add Circle CI Status badge to your repository.