File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212- Add ` run ` target which runs ` go run ` . ([ #376 ] ( https://github.com/golang-templates/seed/pull/376 ) )
1313
14+ ### Fixed
15+
16+ - Allow testing when CGO_ENABLED=0. ([ #383 ] ( https://github.com/golang-templates/seed/pull/383 ) )
17+
1418## [ 0.21.0] ( https://github.com/golang-templates/seed/releases/tag/v0.21.0 )
1519
1620### Added
Original file line number Diff line number Diff line change @@ -53,9 +53,15 @@ lint: ## golangci-lint
5353vuln : # # govulncheck
5454 go tool govulncheck ./...
5555
56+ ifeq ($(CGO_ENABLED ) ,0)
57+ RACE_OPT =
58+ else
59+ RACE_OPT = -race
60+ endif
61+
5662.PHONY : test
5763test : # # go test
58- go test -race -covermode=atomic -coverprofile=coverage.out -coverpkg=./... ./...
64+ go test $( RACE_OPT ) -covermode=atomic -coverprofile=coverage.out -coverpkg=./... ./...
5965 go tool cover -html=coverage.out -o coverage.html
6066
6167.PHONY : diff
You can’t perform that action at this time.
0 commit comments