mirror of https://github.com/status-im/go-waku.git
chore: add codeclimate code coverage support (#126)
This commit is contained in:
parent
82ec44fcfa
commit
74fab9e50d
|
@ -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/
|
||||
|
|
9
Makefile
9
Makefile
|
@ -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)
|
||||
|
|
|
@ -29,6 +29,10 @@ pipeline {
|
|||
steps { sh 'make test' }
|
||||
}
|
||||
|
||||
stage('Codeclimate') {
|
||||
steps { sh 'make codeclimate-coverage' }
|
||||
}
|
||||
|
||||
stage('Build example') {
|
||||
steps { sh 'make build-example' }
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue