[librsvg: 2/6] gitlab-ci: Add manual build triggers for rustfmt and clippy.



commit ca2bdc627896538a62702ae02de99af876fa9a7e
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Tue Feb 20 08:06:13 2018 +0000

    gitlab-ci: Add manual build triggers for rustfmt and clippy.

 .gitlab-ci.yml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ad7f116d..195fc1ba 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@
 
 stages:
   - test
+  - lint
 
 .test_template: &distro_test
   stage: test
@@ -57,3 +58,29 @@ opensuse:test:
       - schedules
       - tags
       - web
+
+# Configure and run rustfmt on nightly
+# Exits and builds fails if on bad format
+rustfmt:
+  image: "rustlang/rust:nightly"
+  stage: lint
+  variables:
+    CFG_RELEASE_CHANNEL: "nightly"
+  script:
+  - rustc --version && cargo --version
+  - cd rust/
+  - cargo install rustfmt-nightly --force
+  - cargo fmt --all -- --write-mode=diff
+  when: manual
+
+# Configure and run clippy on nightly
+# Only fails on errors atm.
+clippy:
+  image: "rustlang/rust:nightly"
+  stage: lint
+  script:
+  - rustc --version && cargo --version
+  - cd rust/
+  - cargo install clippy --force
+  - cargo clippy --all
+  when: manual


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]