summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-02 12:54:10 -0600
committermo khan <mo@mokhan.ca>2025-07-02 12:54:10 -0600
commit0fcd18012c0069266d7f94f232eb6971dae72d53 (patch)
tree793c75278127eff57e1272e90fad7af9a725259a
parentca38a567740fe77c1a0f0978c5f89121ce800f48 (diff)
chore: use make target to setup and run lint, test jobs
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--Makefile3
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