From b536ea64d76f52e10574b0abfe294cd14f5da54c Mon Sep 17 00:00:00 2001 From: Dylan Myers Date: Mon, 3 Aug 2026 08:30:11 -0400 Subject: [PATCH] ci: run the test suite under the race detector via make test-race (PIPE-1223) Assisted-by: Claude Opus 4.8 --- .github/workflows/ci.yml | 6 ++++-- Makefile | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ef081b..6eed391 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,9 +84,11 @@ jobs: go-version-file: go.mod cache: true - - name: Run tests + - name: Run tests (race detector) + env: + CGO_ENABLED: "1" run: | - go test ./... + make test-race - name: Run embedded-library tests run: | diff --git a/Makefile b/Makefile index 08a7959..4bc20f9 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,12 @@ install-tools: test: go test ./... +# test-race runs the full suite under the race detector. CI gates on this +# target so data races in production code fail the build (PIPE-1223). Requires +# a C toolchain (the race detector needs cgo). +test-race: + go test -race ./... + lint: go tool revive -config .revive.toml -formatter friendly ./...