mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(Makefile): align test-race with CI configuration (#22727)
Follow-up to #22705 (pre-commit/pre-push hooks). Unifies `test` and `test-race` into the same structure and lets CI call `make test-race` instead of reproducing the gotestsum command. **Parallelism**: Extracted from `GOTEST_FLAGS` into `TEST_PARALLEL_PACKAGES` / `TEST_PARALLEL_TESTS` (default 8x8). `test-race` overrides to 4x4 via target-specific Make variables. `TEST_NUM_PARALLEL_PACKAGES` and `TEST_NUM_PARALLEL_TESTS` env vars continue to work for both targets. **GOTEST_FLAGS**: Changed from simply-expanded (`:=`) to recursively-expanded (`=`) so target-specific overrides take effect at recipe time. **CI**: `.github/actions/test-go-pg/action.yaml` now calls `make test-race` / `make test` instead of hand-rolling the gotestsum command, eliminating drift between local and CI configurations. Refs #22705
This commit is contained in:
@@ -70,11 +70,7 @@ runs:
|
||||
set -euo pipefail
|
||||
|
||||
if [[ ${RACE_DETECTION} == true ]]; then
|
||||
gotestsum --junitfile="gotests.xml" --packages="${TEST_PACKAGES}" -- \
|
||||
-tags=testsmallbatch \
|
||||
-race \
|
||||
-parallel "${TEST_NUM_PARALLEL_TESTS}" \
|
||||
-p "${TEST_NUM_PARALLEL_PACKAGES}"
|
||||
make test-race
|
||||
else
|
||||
make test
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user