From c64b52ffe18f9f4457b957fb943a64e4e7509a04 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 1 Apr 2021 17:21:37 -0400 Subject: [PATCH] Attempt to generate CI coverage --- Jenkinsfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8512cf4..fda5c4a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,8 +25,20 @@ pipeline { stage('Test') { steps { - sh "go test ./... -v" + sh "go test -coverprofile=cover.out ./... -v" + } + } + + stage('Test Coverage') { + steps { + sh "go get github.com/t-yuki/gocover-cobertura" + sh "gocover-cobertura < cover.out > coverage.xml" } } } + post { + always { + cobertura coberturaReportFile: 'coverage.xml' + } + } } \ No newline at end of file