CODECOV_URL := "https://codecov.xarth.tv"
ORG         := qe
PROJECT     := grid_router

# Run tests, and also record their coverage to extract/cover.json
test-with-coverage:
	cd src; go test -v ./... -coverprofile=coverage.out | tee test.out; \
	  cat test.out | go-junit-report > extract/test_report.xml; \
	  gocov convert coverage.out | gocov-xml > extract/codecov_coverage.xml; \
	  rm test.out

# Will search for the Codecov Coverage and upload it. Must run tests with coverage before calling this
ci-upload-coverage:
	curl -s ${CODECOV_URL}/bash | bash -s - -t ghe -r ${ORG}/${PROJECT} -s .manta/
