mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-08-25 00:01:19 +00:00
chore: add codeclimate code coverage support (#126)
This commit is contained in:
@@ -18,6 +18,7 @@ go-waku
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
coverage.html
|
||||
coverage.json
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
||||
@@ -28,6 +28,15 @@ coverage:
|
||||
go test -count 1 -coverprofile=coverage.out ./...
|
||||
go tool cover -html=coverage.out -o=coverage.html
|
||||
|
||||
codeclimate-coverage:
|
||||
CC_TEST_REPORTER_ID=343d0af350b29aaf08d1e5bb4465d0e21df6298a27240acd2434457a9984c74a
|
||||
GIT_COMMIT=$(git log | grep -m1 -oE '[^ ]+$')
|
||||
./coverage/cc-test-reporter before-build;\
|
||||
go test -count 1 -coverprofile coverage/cover.out ./...;\
|
||||
go test -coverprofile coverage/cover.out -json ./... > coverage/coverage.json
|
||||
EXIT_CODE=$$?;\
|
||||
./coverage/cc-test-reporter after-build -t cover --exit-code $$EXIT_CODE || echo “Skipping Code Climate coverage upload”
|
||||
|
||||
# build a docker image for the fleet
|
||||
docker-image: DOCKER_IMAGE_TAG ?= latest
|
||||
docker-image: DOCKER_IMAGE_NAME ?= statusteam/go-waku:$(DOCKER_IMAGE_TAG)
|
||||
|
||||
Vendored
+4
@@ -29,6 +29,10 @@ pipeline {
|
||||
steps { sh 'make test' }
|
||||
}
|
||||
|
||||
stage('Codeclimate') {
|
||||
steps { sh 'make codeclimate-coverage' }
|
||||
}
|
||||
|
||||
stage('Build example') {
|
||||
steps { sh 'make build-example' }
|
||||
}
|
||||
|
||||
Executable
BIN
Binary file not shown.
Reference in New Issue
Block a user