Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Report test rsults in jenkins
Browse files Browse the repository at this point in the history
thanks to https://jincod.github.io/2017/09/04/jenkins-integration-with-jest/

Automated Javascript and React Testing with Jest #1501
  • Loading branch information
metas-ts committed Feb 8, 2018
1 parent 2162ffa commit 9ef4a04
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ node('agent && linux') // shall only run on a jenkins agent with linux
def nodeHome = tool name: "$NODEJS_TOOL_NAME"
env.PATH = "${nodeHome}/bin:${env.PATH}"

sh "yarn install"
sh "yarn lint --quiet"
sh "yarn test"
sh 'yarn install'
sh 'yarn lint --quiet'

sh "yarn add jest jest-junit --dev"
withEnv(["JEST_JUNIT_OUTPUT=./jest-test-results.xml"]) {
sh 'yarn test --ci --testResultsProcessor="jest-junit"'
}
junit 'jest-test-results.xml'

sh "webpack --config webpack.prod.js --bail --display-error-details"

def misc = new de.metas.jenkins.Misc();
Expand Down

0 comments on commit 9ef4a04

Please sign in to comment.