Created
February 19, 2020 21:02
-
-
Save jbleduigou/0dfb76d2bf9a1d9b9e79073b32763e67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage('Test') { | |
steps { | |
// Retrieve tool for converting output to junit format | |
sh 'go get -u github.com/jstemmer/go-junit-report' | |
// Run unit tests and redirect output to go-junit-report | |
sh 'cd $GOPATH/src/github/jbleduigou/budgetcategorizer && go test -v ./... 2>&1 | go-junit-report > report.xml' | |
} | |
post { | |
always { | |
// Publish test results | |
step([$class: 'JUnitResultArchiver', testResults: 'report.xml']) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment