Skip to content

Commit 6b3b06b

Browse files
Fixed test report path for SonarQube (#1285)
* fixed path and updated some gradle scripts to use task.register * debug * debug * debug * debug * debug * ci doesnt run?? * removal * artifactss * cat * updated tests.gradle to use new syntax * updated tests.gradle to use new syntax
1 parent 513321c commit 6b3b06b

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Implemented GitHub Actions for automatic code integration. [#1237](https://github.com/ie3-institute/PowerSystemDataModel/issues/1237)
1111

1212
### Fixed
13-
13+
- Fixed SonarQube junit path issue in GitHub Actions [#1284](https://github.com/ie3-institute/PowerSystemDataModel/issues/1284)
1414
### Changed
1515
- Replaced `return this` with `return thisInstance` in CopyBuilders [#1250](https://github.com/ie3-institute/PowerSystemDataModel/issues/1250)
1616

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ tasks.withType(Javadoc){
115115
failOnError = false // TODO: Temp until JavaDoc issues are resolved
116116
}
117117

118-
task printVersion {
118+
tasks.register('printVersion') {
119119
doLast {
120120
println project.version
121121
}

gradle/scripts/semVer.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// tasks for semantic versioning using semver-gradle https://github.com/ethauvin/semver-gradle
22

3-
task currentVersion {
4-
doFirst{
3+
tasks.register('currentVersion') {
4+
doFirst {
55
println semver.semver
66
}
77
}
88

9-
task devVersion {
10-
doFirst{
9+
tasks.register('devVersion') {
10+
doFirst {
1111
println "${semver.major}.${semver.minor}-SNAPSHOT"
1212
}
1313
}

gradle/scripts/sonarqube.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sonarqube {
1414
'src/test/groovy'] // test src dirs
1515
// reports stuff (for all languages)
1616
property 'sonar.junit.reportPaths', [
17-
'build/test-results/allTests'] // Comma-delimited list of paths to Surefire XML-format reports.
17+
'build/test-results/test'] // Comma-delimited list of paths to Surefire XML-format reports.
1818
// unit tests reports dirs
1919
property "sonar.coverage.jacoco.xmlReportsPath", [
2020
"build/reports/jacoco/test/jacocoTestReport.xml"] // Comma-separated list of paths to JaCoCo (jacoco.xml) report files.

gradle/scripts/tests.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
test {
22
useJUnitPlatform()
33
testLogging {
4-
events "skipped", "failed"
4+
events = ["skipped", "failed"]
55
}
66

77
// Improve logging for failed Spock tests
88
testLogging {
9-
exceptionFormat "Full"
9+
exceptionFormat = "Full"
1010
}
1111
}
1212

13-
task unitTest(type: Test) {
14-
description 'Run only unit tests.'
15-
group 'Verification'
13+
tasks.register('unitTest', Test) {
14+
description = 'Run only unit tests.'
15+
group = 'Verification'
1616

1717
filter {
1818
includeTestsMatching '*Test*.*'
1919
excludeTestsMatching '*IT'
2020
}
2121
useJUnitPlatform()
2222
testLogging {
23-
events "skipped", "failed"
23+
events = ["skipped", "failed"]
2424
}
2525
}
2626

27-
task integrationTest(type: Test) {
28-
description 'Run only the integration tests.'
29-
group 'Verification'
27+
tasks.register('integrationTest', Test) {
28+
description = 'Run only the integration tests.'
29+
group = 'Verification'
3030

3131
filter {
3232
includeTestsMatching '*IT.*'
3333
excludeTestsMatching '*Test*.*'
3434
}
3535
useJUnitPlatform()
3636
testLogging {
37-
events "skipped", "failed"
37+
events = ["skipped", "failed"]
3838
}
3939

4040
mustRunAfter unitTest

0 commit comments

Comments
 (0)