DEV Community

loading...

Test Circle CI config.yml on Your Machine

Koji (he/him)
Never lose curiosity Software Engineer in NYC/Research Resident@NYU-ITP18-19 Mostly I work with typescript, javascript, react, and python. code to do something weird/useless/helpful
・1 min read

The team has used Circle CI and I just used it to run tests which means I haven't touched config.yml luckily lol

However, for the current project, I needed to set up a new Circle CI environment. (Actually, my config.yml isn't complicated since I've done most things on my Docker image 😂)

Then, I noticed that Circle CI has a CLI tool to test config.yml locally.
https://circleci.com/docs/2.0/local-cli/

This tool has 2 functions. One is to validate config.yml and the other is run a job. The requirement is to install Docker.
This tool is using their own docker image.

circleci/picard             latest              7d0931871af3        8 days ago          103MB
Enter fullscreen mode Exit fullscreen mode
# validate 
$ circleci config validate

# run
$ circleci local execute --job build

Enter fullscreen mode Exit fullscreen mode

The execution speed isn't fast, but I think still this tool is useful, sometimes we need to wait for others' task. This could save time and help us to see errors on Circle CI dashboard.

However, I'm still struggling with Circle CI lol
https://discuss.circleci.com/t/trying-to-build-node-with-typescript-but-circle-ci-mentions-to-react/31546

If you know the solution, please let me know!

Discussion (2)

Collapse
dietertroy profile image
Troy

I've used Jenkins, Jenkins X, GitLab onprem and cloud, BitBucket pipelines, AWS CodeBuild/Code Pipeline but not Circle CI yet! Going to give this a spin. It's on my list above Travis CI

Collapse
kojikanao profile image
Koji (he/him) Author

Circle CI may be similar to GitLab.