DEV Community


Posted on

Test Circle CI config.yml on Your Machine

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.

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

If you know the solution, please let me know!

Top comments (2)

dietertroy profile image

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

0xkoji profile image

Circle CI may be similar to GitLab.