From aa5cf25263eb1a61a63eac1444a42109a434188c Mon Sep 17 00:00:00 2001 From: Alejandro Falkowski Date: Tue, 11 Apr 2023 19:38:43 +0200 Subject: [PATCH] feat: send coveralls data (#18) --- build/make/go.mak | 12 ++++++++++++ build/make/service.mak | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/build/make/go.mak b/build/make/go.mak index 0491f5f..80a4acd 100644 --- a/build/make/go.mak +++ b/build/make/go.mak @@ -39,6 +39,10 @@ html-coverage: remove-generated-coverage func-coverage: remove-generated-coverage go tool cover -func test/final.cov +# Send coveralls data. +goveralls: remove-generated-coverage + goveralls -coverprofile=test/final.cov -service=circle-ci -repotoken=${COVERALLS_REPO_TOKEN} + # Run security checks. sec: bin/build/sec/go @@ -48,3 +52,11 @@ update-dep: get tidy vendor # Update all go dep. update-all-deps: get-all tidy vendor + +# Start the environment. +start: + bin/build/docker/env start + +# Stop the environment. +stop: + bin/build/docker/env stop diff --git a/build/make/service.mak b/build/make/service.mak index 31b600b..01c9f1b 100644 --- a/build/make/service.mak +++ b/build/make/service.mak @@ -56,6 +56,21 @@ proto-generate: # Fix the lint issues in the code (if possible). fix-lint: go-fix-lint ruby-fix-lint proto-format +sanitize-coverage: + bin/quality/go/cov + +# Get the HTML coverage for go. +html-coverage: sanitize-coverage + go tool cover -html test/reports/final.cov + +# Get the func coverage for go. +func-coverage: sanitize-coverage + go tool cover -func test/reports/final.cov + +# Send coveralls data. +goveralls: sanitize-coverage + goveralls -coverprofile=test/reports/final.cov -service=circle-ci -repotoken=${COVERALLS_REPO_TOKEN} + # Run all the features. features: build-test make -C test features @@ -106,3 +121,11 @@ go-sec: # Run security checks. sec: go-sec + +# Start the environment. +start: + bin/build/docker/env start + +# Stop the environment. +stop: + bin/build/docker/env stop