Skip to content

Commit

Permalink
chore: add test race and fix commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigBalthazar committed Sep 8, 2024
1 parent 242f2a9 commit 4f590a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
go-version: '1.22.5'

- name: Unit tests
run: make unit_test
run: make unit-test

- name: Race tests
run: make test_race
run: make test-race
18 changes: 8 additions & 10 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
PACKAGES=$(shell go list ./... | grep -v 'tests' | grep -v 'grpc/gen')

ifneq (,$(filter $(OS),Windows_NT MINGW64))
EXE = .exe
RM = del /q
else
RM = rm -rf
endif

### Tools needed for development
devtools:
@echo "Installing devtools"
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install mvdan.cc/gofumpt@latest
go install github.com/ethereum/go-ethereum/cmd/abigen@latest

### Testing
unit_test:
unit-test:
go test $(PACKAGES)

test:
go test ./... -covermode=atomic

test-race:
go test ./... --race

### Formatting the code
fmt:
gofumpt -l -w .
Expand All @@ -27,7 +25,7 @@ check:
golangci-lint run --timeout=20m0s

### pre commit
pre-commit: fmt check unit_test
pre-commit: fmt check unit-test
@echo ready to commit...

.PHONY: build

0 comments on commit 4f590a4

Please sign in to comment.