From 711973066805a36a234d1da9aaba42299837c7ee Mon Sep 17 00:00:00 2001 From: Rafael Bradley Date: Wed, 13 Aug 2025 16:51:16 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 549c5a5..5bf73a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,38 @@ -lint-job: - stage: .pre +stages: + - lint + - build + - test + +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + +lint: + stage: lint image: rust:latest script: - rustup component add rustfmt clippy - cargo fmt --check - cargo clippy -- -D warnings + artifacts: + paths: + - "target/" -build-job: +build: stage: build image: rust:latest script: - cargo build --release + artifacts: + paths: + - "target/" -test-job: +test: stage: test image: rust:latest script: - cargo test --release + artifacts: + paths: + - "target/" \ No newline at end of file