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