From aeab762d95cf01a862cdb91fe58100fc1d590f73 Mon Sep 17 00:00:00 2001 From: vOROn200 Date: Mon, 15 Jul 2019 12:08:34 +0300 Subject: [PATCH] added gitlab-ci --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..72bb85c763 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,43 @@ +stages: + - build + - tests + +.rust-template: &rust-template + before_script: + - rustup --version + - rustc --version + - cargo --version + tags: + - franklin + +compile: + image: 'registry.mattr.network/devops/images/rust_night' + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - target/ + <<: *rust-template + stage: build + script: + - cargo fmt --all -- --check + - cargo build --verbose + only: + - master + - merge_requests + +tests: + image: 'registry.mattr.network/devops/images/rust_night' + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - target/ + policy: pull + <<: *rust-template + stage: tests + when: manual + script: + - cargo clippy --tests --benches -- -D warnings + - cargo test --verbose + only: + - master + - merge_requests