summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-13 15:18:08 -0600
committermo khan <mo@mokhan.ca>2025-06-13 15:18:08 -0600
commit2d120cad9b96a6318e730b6d9a9c39c4ee433c42 (patch)
tree89570193c5004e55eb84816615d948083c2e8624
parentbe6b50b79b543022c211e6fda9fd1ea4c56b93db (diff)
chore: add job for running tests to search for race conditions
-rw-r--r--.gitlab-ci.yml7
-rw-r--r--Makefile3
2 files changed, 10 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 25dca9e..c5c5e0b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,6 +37,13 @@ unit:
stage: test
script:
- go test ./...
+race:
+ image: golang:alpine
+ stage: test
+ script:
+ - go test -race -shuffle=on ./...
+ variables:
+ CGO_ENABLED: 1
integration:
image: golang:1.24.3
stage: test
diff --git a/Makefile b/Makefile
index 3249a83..07d65fb 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,9 @@ setup:
build: bin/authzd bin/sparkled
test-unit:
+ @go test -shuffle=on ./...
+
+test-race:
@CGO_ENABLED=1 go test -race -shuffle=on ./...
test-integration: build-image