Skip to content

Commit

Permalink
chore(ci): fix redirect with GITHUB_STEP_SUMMARY
Browse files Browse the repository at this point in the history
If GITHUB_STEP_SUMMARY isn't set then the redirect should be to
/dev/null, even if it isn't called the shell parser will complain
  • Loading branch information
dnwe committed Jul 20, 2022
1 parent d96db86 commit b6a42cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ 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}
|| NO_COLOR=1 $(GOBIN)/tparse -format markdown -file output.json -all >${GITHUB_STEP_SUMMARY:-/dev/null}

.PHONY: test_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}
[ -z "${GITHUB_STEP_SUMMARY:-}" ] \
|| NO_COLOR=1 $(GOBIN)/tparse -format markdown -file output.json -all >${GITHUB_STEP_SUMMARY:-/dev/null}

0 comments on commit b6a42cc

Please sign in to comment.