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 e74aea4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ lint:
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}

[ -z "$${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 e74aea4

Please sign in to comment.