@@ -3,7 +3,6 @@ WEBSITE_REPO=github.com/hashicorp/terraform-website
33PKG_NAME =github
44
55COVERAGEARGS? =-race -coverprofile=coverage.txt -covermode=atomic
6- export CGO_ENABLED =0
76
87# VARIABLE REFERENCE:
98#
3231 go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.0
3332
3433build : lintcheck
35- go build -ldflags=" -s -w" ./...
34+ CGO_ENABLED=0 go build -ldflags=" -s -w" ./...
3635
3736fmt :
3837 @echo " ==> Fixing source code formatting..."
@@ -48,8 +47,8 @@ lintcheck:
4847
4948test :
5049 @branch=$$(git rev-parse --abbrev-ref HEAD ) ; \
51- printf " ==> Running acceptance tests on branch: \033[1m%s\033[0m...\n" " 🌿 $$ branch 🌿"
52- go test $(TEST ) \
50+ printf " ==> Running unit tests on branch: \033[1m%s\033[0m...\n" " 🌿 $$ branch 🌿"
51+ CGO_ENABLED=0 go test $(TEST ) \
5352 -timeout=30s \
5453 -parallel=4 \
5554 -v \
@@ -60,15 +59,15 @@ test:
6059testacc :
6160 @branch=$$(git rev-parse --abbrev-ref HEAD ) ; \
6261 printf " ==> Running acceptance tests on branch: \033[1m%s\033[0m...\n" " 🌿 $$ branch 🌿"
63- TF_ACC=1 go test $(TEST ) -v -run ' ^TestAcc' $(RUNARGS ) $(TESTARGS ) -timeout 120m -count=1
62+ TF_ACC=1 CGO_ENABLED=0 go test $(TEST ) -v -run ' ^TestAcc' $(RUNARGS ) $(TESTARGS ) -timeout 120m -count=1
6463
6564test-compile :
6665 @if [ " $( TEST) " = " ./..." ]; then \
6766 echo " ERROR: Set TEST to a specific package. For example," ; \
6867 echo " make test-compile TEST=./$( PKG_NAME) " ; \
6968 exit 1; \
7069 fi
71- go test -c $(TEST ) $(TESTARGS )
70+ CGO_ENABLED=0 go test -c $(TEST ) $(TESTARGS )
7271
7372website :
7473ifeq (,$(wildcard $(GOPATH ) /src/$(WEBSITE_REPO ) ) )
0 commit comments