Test Circle CI config.yml on Your Machine

0xkoji - Jul 25 '19 - - Dev Community

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!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .