diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02b39f809e..a46b84bae5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,9 @@ jobs: uses: actions/checkout@v1 with: fetch-depth: 1 + - name: Run tests for cmd packages / tparse + run: | + make test/cmd/tparse | tee tparse.txt || cat tparse.txt - name: Run tests for cmd packages run: | make test/cmd @@ -39,6 +42,9 @@ jobs: uses: actions/checkout@v1 with: fetch-depth: 1 + - name: Run tests for internal packages / tparse + run: | + make test/internal/tparse | tee tparse.txt || cat tparse.txt - name: Run tests for internal packages run: | make test/internal @@ -52,6 +58,9 @@ jobs: uses: actions/checkout@v1 with: fetch-depth: 1 + - name: Run tests for pkg packages / tparse + run: | + make test/pkg/tparse | tee tparse.txt || cat tparse.txt - name: Run tests for pkg packages run: | make test/pkg diff --git a/Makefile.d/test.mk b/Makefile.d/test.mk index b96e5b2026..7b4cca1c97 100644 --- a/Makefile.d/test.mk +++ b/Makefile.d/test.mk @@ -17,31 +17,61 @@ .PHONY: test ## run tests for cmd, internal, pkg test: + go test -cover ./cmd/... ./internal/... ./pkg/... + +.PHONY: test/tparse +## run tests for cmd, internal, pkg and show table +test/tparse: go test -json -cover ./cmd/... ./internal/... ./pkg/... | tparse -notests .PHONY: test/cmd ## run tests for cmd test/cmd: + go test -cover ./cmd/... + +.PHONY: test/cmd/tparse +## run tests for cmd and show table +test/cmd/tparse: go test -json -cover ./cmd/... | tparse -pass -notests .PHONY: test/internal ## run tests for internal test/internal: + go test -cover ./internal/... + +.PHONY: test/internal/tparse +## run tests for internal and show table +test/internal/tparse: go test -json -cover ./internal/... | tparse -pass -notests .PHONY: test/pkg ## run tests for pkg test/pkg: + go test -cover ./pkg/... + +.PHONY: test/pkg/tparse +## run tests for pkg and who table +test/pkg/tparse: go test -json -cover ./pkg/... | tparse -pass -notests .PHONY: test/hack ## run tests for hack test/hack: + go test -cover ./hack/... + +.PHONY: test/hack/tparse +## run tests for hack and show table +test/hack/tparse: go test -json -cover ./hack/... | tparse -pass -notests .PHONY: test/all ## run tests for all Go codes test/all: + go test -cover ./... + +.PHONY: test/all/tparse +## run tests for all Go codes and show table +test/all/tparse: go test -json -cover ./... | tparse -notests .PHONY: coverage