From ce73dabe163abfd2b6d7ffcd0804962cba75a9c3 Mon Sep 17 00:00:00 2001 From: jan Michal Date: Wed, 26 Jan 2022 14:53:11 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a36a1d..50eddcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,34 @@ image: "rust:latest" +default: + before_script: + - rustc --version + - cargo --version + stages: - - build - test - -build-job: - stage: build +test-code: + stage: test script: - - cargo build --release - + - cargo test + - cargo install cargo-tarpaulin + - cargo tarpaulin --ignore-tests -lint-test-job: +lint-code: stage: test script: - - cargo clippy + - rustup component add clippy + - cargo clippy -- -D warnings + +format-code: + stage: test + script: + - rustup component add rustfmt + - cargo fmt -- --check +audit-code: + stage: test + script: + - cargo install cargo-audit + - cargo audit