From 0fcd18012c0069266d7f94f232eb6971dae72d53 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 2 Jul 2025 12:54:10 -0600 Subject: chore: use make target to setup and run lint, test jobs --- .gitlab-ci.yml | 8 +++----- Makefile | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf5e6ff5..375ce308 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,15 +36,13 @@ unit: stage: test needs: [] script: - - cargo test + - make test lint: image: rust:latest stage: test needs: [] before_script: - - rustup component add clippy - - rustup component add rustfmt + - make setup script: - - cargo fmt - - cargo clippy -- -D warnings + - make lint diff --git a/Makefile b/Makefile index 6e2fc9b0..eba8ed3b 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ IMAGE_TAG := $(PROJECT_NAME):$(GIT_BRANCH) .PHONY: build check test run clean fmt lint doc .PHONY: build-image run-image health-check list-services test-grpc +setup: + @rustup component add clippy rustfmt + # Cargo targets build: @cargo build -- cgit v1.2.3