Skip to content

Commit 27bb79a

Browse files
committed
Switch to @casualbot/jest-sonar-reporter
1 parent 82d942d commit 27bb79a

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.github/workflows/sonarqube.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
run: |
3131
coverage=$(find coverage -type f -name '*lcov.info' | tr '\n' ',')
3232
echo "reportPaths=$coverage" >> $GITHUB_OUTPUT
33-
testResults=$(find coverage -type f -name '*test-report.xml' | tr '\n' ',')
34-
echo "testExecutionReportPaths=$testResults" >> $GITHUB_OUTPUT
33+
reports=$(find coverage -type f -name 'jest-sonar-report*.xml' | tr '\n' ',')
34+
echo "testExecutionReportPaths=$reports" >> $GITHUB_OUTPUT
3535
3636
sonarqube:
3737
name: 🩻 SonarQube

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"@babel/preset-env": "^7.12.11",
7878
"@babel/preset-typescript": "^7.12.7",
7979
"@babel/register": "^7.12.10",
80+
"@casualbot/jest-sonar-reporter": "^2.2.5",
8081
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.13.tgz",
8182
"@types/bs58": "^4.0.1",
8283
"@types/content-type": "^1.1.5",
@@ -103,7 +104,6 @@
103104
"jest": "^29.0.0",
104105
"jest-localstorage-mock": "^2.4.6",
105106
"jest-mock": "^29.0.0",
106-
"jest-sonar-reporter": "^2.0.0",
107107
"jsdoc": "^3.6.6",
108108
"matrix-mock-request": "^2.5.0",
109109
"patch-package": "^6.5.0",
@@ -128,10 +128,11 @@
128128
"text-summary",
129129
"lcov"
130130
],
131-
"testResultsProcessor": "jest-sonar-reporter"
131+
"testResultsProcessor": "@casualbot/jest-sonar-reporter"
132132
},
133-
"jestSonar": {
134-
"reportPath": "coverage",
135-
"sonar56x": true
133+
"@casualbot/jest-sonar-reporter": {
134+
"outputDirectory": "coverage",
135+
"outputName": "jest-sonar-report.xml",
136+
"relativePaths": true
136137
}
137138
}

sonar-project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ sonar.exclusions=docs,examples,git-hooks
1111
sonar.typescript.tsconfigPath=./tsconfig.json
1212
sonar.javascript.lcov.reportPaths=coverage/lcov.info
1313
sonar.coverage.exclusions=spec/**/*
14-
sonar.testExecutionReportPaths=coverage/test-report.xml
14+
sonar.testExecutionReportPaths=coverage/jest-sonar-report.xml
1515

1616
sonar.lang.patterns.ts=**/*.ts,**/*.tsx

yarn.lock

+12-10
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,15 @@
10921092
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
10931093
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
10941094

1095+
"@casualbot/jest-sonar-reporter@^2.2.5":
1096+
version "2.2.5"
1097+
resolved "https://registry.yarnpkg.com/@casualbot/jest-sonar-reporter/-/jest-sonar-reporter-2.2.5.tgz#23d187ddb8d65129a3c8d8239b0540a52c4dc82a"
1098+
integrity sha512-Pmb4aEtJudz9G0VsmEUzuDm5iWGOCDsmulzi6AP/RgAXEcmsSxVdxjcgA+2SHC005diU4mXnPLiQyiiMIAtUjA==
1099+
dependencies:
1100+
mkdirp "1.0.4"
1101+
uuid "8.3.2"
1102+
xml "1.0.1"
1103+
10951104
"@eslint/eslintrc@^1.3.3":
10961105
version "1.3.3"
10971106
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95"
@@ -4597,13 +4606,6 @@ jest-snapshot@^29.2.2:
45974606
pretty-format "^29.2.1"
45984607
semver "^7.3.5"
45994608

4600-
jest-sonar-reporter@^2.0.0:
4601-
version "2.0.0"
4602-
resolved "https://registry.yarnpkg.com/jest-sonar-reporter/-/jest-sonar-reporter-2.0.0.tgz#faa54a7d2af7198767ee246a82b78c576789cf08"
4603-
integrity sha512-ZervDCgEX5gdUbdtWsjdipLN3bKJwpxbvhkYNXTAYvAckCihobSLr9OT/IuyNIRT1EZMDDwR6DroWtrq+IL64w==
4604-
dependencies:
4605-
xml "^1.0.1"
4606-
46074609
jest-util@^28.1.3:
46084610
version "28.1.3"
46094611
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0"
@@ -5095,7 +5097,7 @@ mkdirp-classic@^0.5.2:
50955097
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
50965098
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
50975099

5098-
mkdirp@^1.0.4:
5100+
mkdirp@1.0.4, mkdirp@^1.0.4:
50995101
version "1.0.4"
51005102
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
51015103
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
@@ -6806,7 +6808,7 @@ util@~0.12.0:
68066808
is-typed-array "^1.1.3"
68076809
which-typed-array "^1.1.2"
68086810

6809-
uuid@^8.3.2:
6811+
uuid@8.3.2, uuid@^8.3.2:
68106812
version "8.3.2"
68116813
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
68126814
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
@@ -6995,7 +6997,7 @@ write-file-atomic@^4.0.1:
69956997
imurmurhash "^0.1.4"
69966998
signal-exit "^3.0.7"
69976999

6998-
xml@^1.0.1:
7000+
69997001
version "1.0.1"
70007002
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
70017003
integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==

0 commit comments

Comments
 (0)