Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Mocha xunit reporter #791

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ def runTest(version, filter=null, testSuite='test') {
def testRun = (testSuite != 'test-iam') ? testSuite : 'test'

// Actions:
// 3. Install mocha-jenkins-reporter so that we can get junit style output
// 4. Fetch database compare tool for CI tests
// 5. Run tests using filter
// Run tests using filter
withCredentials([usernamePassword(usernameVariable: 'NPMRC_USER', passwordVariable: 'NPMRC_TOKEN', credentialsId: 'artifactory')]) {
withEnv(['NPMRC_EMAIL=' + env.NPMRC_USER]) {
withNpmEnv(registryArtifactoryDown) {
Expand All @@ -106,7 +104,7 @@ def runTest(version, filter=null, testSuite='test') {
export COUCH_URL="${(testSuite == 'test-network/conditions') ? 'http://127.0.0.1:8888' : '${COUCH_BACKEND_URL}'}"
export PROXY_URL='http://127.0.0.1:8474'
set -x
./node_modules/mocha/bin/mocha.js --reporter mocha-jenkins-reporter --reporter-options junit_report_path=${testReportPath},junit_report_stack=true,junit_report_name=${testSuite} ${filter} ${testRun}
./node_modules/mocha/bin/mocha.js --reporter xunit --reporter-options output=${testReportPath},suiteName=${testSuite} ${filter} ${testRun}
"""
}
}
Expand Down Expand Up @@ -141,7 +139,6 @@ pipeline {
withEnv(['NPMRC_EMAIL=' + env.NPMRC_USER]) {
withNpmEnv(registryArtifactoryDown) {
sh 'npm ci'
sh 'npm install mocha-jenkins-reporter --no-save'
}
}
}
Expand Down
Loading
Loading