CI: Add a rustfmt check

This commit is contained in:
Jordan Petridis 2018-10-08 12:03:42 +03:00 committed by Sebastian Dröge
parent 947ddc809d
commit c3e7ab2f61

View file

@ -1,5 +1,6 @@
stages:
- "test"
- "lint"
.cargo_cache: &cache
cache:
@ -60,3 +61,11 @@ test nightly:
image: "rustlang/rust:nightly-slim"
allow_failure: true
<<: *cargo_test
rustfmt:
image: "rustlang/rust:nightly-slim"
stage: "lint"
script:
- rustup component add rustfmt-preview
- cargo fmt --version
- cargo fmt -- --color=always --check