From a585519db4efb036d6bf9418b05886c5386868c4 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Mon, 8 Oct 2018 12:03:42 +0300 Subject: [PATCH] CI: Add a rustfmt check --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d99bd635..b1f653196 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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