8000 fix(2288): fix sonarqube setting (#29) · screwdriver-cd/circuit-fuses@d99a1b3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit d99a1b3

Browse files
authored
fix(2288): fix sonarqube setting (#29)
1 parent 7e36732 commit d99a1b3

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

mocha.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"reporterEnabled": "spec, mocha-sonarqube-reporter",
3+
"mochaSonarqubeReporterReporterOptions": {
4+
"output": "./artifacts/report/test.xml"
5+
}
6+
}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"pretest": "eslint .",
8-
"test": "jenkins-mocha --recursive",
8+
"test": "nyc --report-dir ./artifacts/coverage --reporter=lcov mocha --reporter mocha-multi-reporters --reporter-options configFile=./mocha.config.json --recursive --timeout 4000 --retries 1 --exit --allow-uncaught true --color true",
99
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
1010
},
1111
"repository": {
@@ -44,7 +44,10 @@
4444
"chai": "^3.5.0",
4545
"eslint": "^4.19.1",
4646
"eslint-config-screwdriver": "^3.0.0",
47-
"jenkins-mocha": "^6.0.0",
47+
"mocha": "^8.2.1",
48+
"mocha-multi-reporters": "^1.5.1",
49+
"mocha-sonarqube-reporter": "^1.0.2",
50+
"nyc": "^15.0.0",
4851
"mockery": "^2.0.0",
4952
"sinon": "^1.17.4",
5053
"sinon-as-promised": "^4.0.2"

screwdriver.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
shared:
2-
image: node:6
2+
image: node:12
33

44
jobs:
55
main:
66
environment:
7-
SD_SONAR_OPTS: "-Dsonar.sources=index.js -Dsonar.javascript.lcov.reportPath=artifacts/coverage/lcov.info"
7+
SD_SONAR_OPTS: "-Dsonar.sources=index.js -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=artifacts/coverage/lcov.info -Dsonar.testExecutionReportPaths=artifacts/report/test.xml"
88
requires: [~pr, ~commit]
99
steps:
1010
- install: npm install

0 commit comments

Comments
 (0)
0