I'm currently adding Rust support to MailChecker thus I had to run the Rust generated project tests on CircleCI. At the time of writing, CircleCI does not support Rust and Rustup setup had an issue with CircleCI. I just wanted to find the easiest way to use cargo test in the CI and the good news is: that's what Docker is good at!
Just add a single line to your circle.yml file and you are good to go, I hope this will help others!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
services: | |
- docker | |
test: | |
override: | |
# don't forget to replace "1.18" with your rust version | |
- docker run -it --rm -v $(pwd):/source -w /source scorpil/rust:1.18 cargo test |