Skip to content

Commit

Permalink
pass tparse by tee command (#562)
Browse files Browse the repository at this point in the history
* ⚗️ pass tparse by true command

Signed-off-by: Rintaro Okamura <[email protected]>

* 🎨 split runs

Signed-off-by: Rintaro Okamura <[email protected]>

* 🎨 revise

Signed-off-by: Rintaro Okamura <[email protected]>

* 🎨 revise

Signed-off-by: Rintaro Okamura <[email protected]>
  • Loading branch information
rinx authored Jul 9, 2020
1 parent c52ca18 commit 845c43e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
30 changes: 30 additions & 0 deletions Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 845c43e

Please sign in to comment.