Test changes to CircleCI config locally
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.
circleciCLI (On Mac, that would be
brew install circleci)
- Write/modify the config in
- Validate config with
circleci config validate
- Test the job by running
circleci local executeto execute all jobs or
circleci 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.