Skip to content

Commit

Permalink
chore(ci): add go test -race ci workflows (ChainSafe#3396)
Browse files Browse the repository at this point in the history
Co-authored-by: Kishan Sagathiya <kishansagathiya@gmail.com>
  • Loading branch information
axaysagathiya and kishansagathiya committed Jul 21, 2023
1 parent 115d6f5 commit 7f6830d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ jobs:
go test -run ^Test_Trie_MemoryUsage$ ./lib/trie
sed -i 's/const skip = false/const skip = true/g' ./lib/trie/mem_test.go
- name: Test State - Race
run: make test-state-race
- name: Test - Race
run: make test-using-race-detector

- uses: codecov/codecov-action@v3.1.4
with:
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ it-polkadotjs: build
MODE=polkadot go test ./tests/polkadotjs_test/... -timeout=5m -v

## test: Runs `go test -race` on project test files.
test-state-race:
test-using-race-detector:
@echo " > \033[32mRunning race tests...\033[0m "
go test ./dot/state/... -race -timeout=5m
go test ./dot/sync/... -race -timeout=5m
go test ./internal/log/... -race -timeout=5m
go test ./lib/blocktree/... -race -timeout=5m
go test ./lib/grandpa/... -race -timeout=5m


## deps: Install missing dependencies. Runs `go mod download` internally.
deps:
Expand Down

0 comments on commit 7f6830d

Please sign in to comment.