Skip to content

Commit

Permalink
Merge pull request #2236 from Shopify/dnwe/tparse
Browse files Browse the repository at this point in the history
chore(ci): experiment with using tparse
  • Loading branch information
dnwe authored Jun 1, 2022
2 parents 53e77a4 + 654b2b9 commit 4c0bbf8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ _testmain.go

*.exe

coverage.txt
profile.out

simplest-uncommitted-msg-0.1-jar-with-dependencies.jar
/bin
/coverage.txt
/profile.out
/output.json

.idea
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
default: fmt get update test lint

GO := go
GOBIN := $(shell pwd)/bin
GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
GOTEST := $(GO) test -v -race -coverprofile=profile.out -covermode=atomic

FILES := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -not -name '*_test.go')
TESTS := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -name '*_test.go')

$(GOBIN)/tparse:
GOBIN=$(GOBIN) go install github.com/mfridman/tparse@v0.10.3
get:
$(GO) get ./...
$(GO) mod verify
Expand All @@ -23,9 +26,15 @@ fmt:
lint:
GOFLAGS="-tags=functional" golangci-lint run

test:
$(GOTEST) -timeout 2m ./...
test: $(GOBIN)/tparse
$(GOTEST) -timeout 2m -json ./... \
| tee output.json | $(GOBIN)/tparse -follow -all
[ -z "${GITHUB_STEP_SUMMARY}" ] \
|| NO_COLOR=1 $(GOBIN)/tparse -format markdown -file output.json -all >${GITHUB_STEP_SUMMARY}

.PHONY: test_functional
test_functional:
$(GOTEST) -timeout 12m -tags=functional ./...
test_functional: $(GOBIN)/tparse
$(GOTEST) -timeout 12m -tags=functional -json ./... \
| tee output.json | $(GOBIN)/tparse -follow -all
[ -z "${GITHUB_STEP_SUMMARY}" ] \
|| NO_COLOR=1 $(GOBIN)/tparse -format markdown -file output.json -all >${GITHUB_STEP_SUMMARY}

0 comments on commit 4c0bbf8

Please sign in to comment.