@@ -622,22 +622,23 @@ site/.eslintignore site/.prettierignore: .prettierignore Makefile
622
622
echo " $$ {ignore}$$ {rule}" >> " $@ "
623
623
done < " $<"
624
624
625
- test : test-clean
626
- gotestsum --format standard-quiet -- -v -short ./...
625
+ test :
626
+ gotestsum --format standard-quiet -- -v -short -count=1 ./...
627
627
.PHONY : test
628
628
629
629
# When updating -timeout for this test, keep in sync with
630
630
# test-go-postgres (.github/workflows/coder.yaml).
631
631
# Do add coverage flags so that test caching works.
632
- test-postgres : test-clean test- postgres-docker
632
+ test-postgres : test-postgres-docker
633
633
# The postgres test is prone to failure, so we limit parallelism for
634
634
# more consistent execution.
635
635
DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \
636
636
--junitfile=" gotests.xml" \
637
637
--jsonfile=" gotests.json" \
638
638
--packages=" ./..." -- \
639
639
-timeout=20m \
640
- -failfast
640
+ -failfast \
641
+ -count=1
641
642
.PHONY : test-postgres
642
643
643
644
test-postgres-docker :
@@ -669,10 +670,13 @@ test-postgres-docker:
669
670
.PHONY : test-postgres-docker
670
671
671
672
# Make sure to keep this in sync with test-go-race from .github/workflows/ci.yaml.
672
- test-race : test-clean
673
- gotestsum --junitfile=" gotests.xml" -- -race ./...
673
+ test-race :
674
+ gotestsum --junitfile=" gotests.xml" -- -race -count=1 ./...
674
675
.PHONY : test-race
675
676
677
+ # Note: we used to add this to the test target, but it's not necessary and we can
678
+ # achieve the desired result by specifying -count=1 in the go test invocation
679
+ # instead. Keeping it here for convenience.
676
680
test-clean :
677
681
go clean -testcache
678
682
.PHONY : test-clean
0 commit comments