Skip to content

Commit

Permalink
ci: work around race bug
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander committed Sep 20, 2024
1 parent 37f700e commit ba40f8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ jobs:
ENABLE_PROFILE=true BENCHMARK_SCALE=10 make benchmark
- name: Test
run: make test
# disable race detector to work around https://github.com/mosn/htnn/blob/696b4db07032ecc5e36b8414ec018889b7eb1957/controller/tests/integration/registries/nacos_test.go#L270
run: ENABLE_RACE= make test
- name: Upload artifact
if: always()
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ PROTOC = protoc
PROTO_FILES = $(call rwildcard,$(GO_MODULES),*.proto)
GO_TARGETS = $(patsubst %.proto,%.pb.go,$(PROTO_FILES))

TEST_OPTION ?= -gcflags="all=-N -l" -race -covermode=atomic -coverprofile=cover.out -coverpkg=${PROJECT_NAME}/...
ENABLE_RACE ?= -race
TEST_OPTION ?= -gcflags="all=-N -l" ${ENABLE_RACE} -covermode=atomic -coverprofile=cover.out -coverpkg=${PROJECT_NAME}/...

MOUNT_GOMOD_CACHE = -v $(shell go env GOPATH):/go
ifeq ($(IN_CI), true)
Expand Down

0 comments on commit ba40f8f

Please sign in to comment.