Skip to content

Add -race flag option on test run - #11

Merged
JesseHerrick merged 2 commits into
remoteoss:mainfrom
M-T3K:add-test-race
Apr 9, 2026
Merged

Add -race flag option on test run#11
JesseHerrick merged 2 commits into
remoteoss:mainfrom
M-T3K:add-test-race

Conversation

@M-T3K

@M-T3K M-T3K commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Note: Apologies, I found no PR format established for the project.

This PR concerns the use of the -race flag to catch further concurrency issues when executing go code.

Consequences and implications: using the -race flag causes additional overhead at runtime, meaning tests take longer. Hence why this is done only on tests and in a way that is separate from the default test run. Therefore, it can be disabled and enabled at will. It has no impact on release execution.

Implementation:

  • I propose a separate option in the makefile that is different from default test that is called test-race which runs tests with golang's -race flag.
  • Additionally, the ci file has been updated to also run this -race flag, separately from the tests themselves, so that commits also report potential race conditions & other issues.

Note

Low Risk
Low risk: CI/Makefile-only change that increases test coverage via the Go race detector, with the main impact being longer CI/test runtimes.

Overview
Adds a dedicated test-race job to GitHub Actions CI to run go test -race ./... alongside the existing unit tests.

Extends the Makefile with a matching test-race target so developers can run race-detected tests locally without changing the default make test behavior.

Reviewed by Cursor Bugbot for commit 5d09737. Bugbot is set up for automated code reviews on this repo. Configure here.

@JesseHerrick

Copy link
Copy Markdown
Member

Good thinking! I was using this locally to catch race conditions, but sounds like a good addition to the CI.

@JesseHerrick
JesseHerrick merged commit 03766ff into remoteoss:main Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants