diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 590c155..7f5e368 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -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 \ No newline at end of file + run: make test-race \ No newline at end of file diff --git a/makefile b/makefile index 4d7309d..d293782 100644 --- a/makefile +++ b/makefile @@ -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 . @@ -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 \ No newline at end of file