Update: as of Jan 1, 2021, I no longer recommended CircleCI. I have moved to GitHub Actions for CI/CD.
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
circleciCLI (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 executeto 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.
