I'm running the following make target in a buildkite step
cover:
go test ./... -coverprofile=coverage.out
ccover=$$(go tool cover -func cover.out | grep total | grep -Eo '[0-9]+\.[0-9]+');
if [ $$(bc <<< "$$ccover < 20.0") -eq 1 ]; then\
exit 1;\
fi
This is what my buildkite yaml looks like
- label: ":coverage: check code coverage"
key: "cvg"
command:
- make cover
Now when this executes on the server I get the following error
/bin/sh: syntax error: unexpected redirection
make: *** [Makefile:20: analysecover] Error 2
Error: The command exited with status 1
Any idea on what could be going wrong here ?