diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 868211cf92..a649e3c91e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - - name: Run unit tests + - name: Run tests run: make test test-coverage: @@ -44,5 +44,5 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - - name: Run unit tests in race mode + - name: Run tests in race mode run: make test-race diff --git a/Makefile b/Makefile index da863dea4e..f3c56acbfc 100644 --- a/Makefile +++ b/Makefile @@ -141,7 +141,7 @@ test: @go test -mod=readonly -timeout 30m ./... .PHONY: test -## test-short: Run unit tests in short mode. +## test-short: Run tests in short mode. test-short: @echo "--> Running tests in short mode" @go test -mod=readonly ./... -short @@ -153,10 +153,12 @@ test-e2e: @KNUU_NAMESPACE=celestia-app E2E=true go test -mod=readonly ./test/e2e/... -timeout 30m .PHONY: test-e2e -## test-race: Run unit tests in race mode. +## test-race: Run tests in race mode. test-race: +# TODO: Remove the -skip flag once the following tests no longer contain data races. +# https://github.com/celestiaorg/celestia-app/issues/1369 @echo "--> Running tests in race mode" - @VERSION=$(VERSION) go test -mod=readonly -race -short ./... + @go test -mod=readonly ./... -v -race -skip "TestPrepareProposalConsistency|TestIntegrationTestSuite|TestQGBRPCQueries|TestSquareSizeIntegrationTest|TestStandardSDKIntegrationTestSuite|TestTxsimCommandFlags|TestTxsimCommandEnvVar|TestMintIntegrationTestSuite|TestQGBCLI|TestUpgrade" .PHONY: test-race ## test-bench: Run unit tests in bench mode. diff --git a/x/mint/test/mint_test.go b/x/mint/test/mint_test.go index f38d5514c6..104333af2e 100644 --- a/x/mint/test/mint_test.go +++ b/x/mint/test/mint_test.go @@ -135,7 +135,7 @@ func (s *IntegrationTestSuite) estimateInflationRate(startHeight int64, endHeigh // In order for 'go test' to run this suite, we need to create // a normal test function and pass our suite to suite.Run -func TestIntegrationTestSuite(t *testing.T) { +func TestMintIntegrationTestSuite(t *testing.T) { if testing.Short() { t.Skip("skipping mint integration test in short mode.") }