File tree Expand file tree Collapse file tree 5 files changed +35
-5
lines changed
main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages Expand file tree Collapse file tree 5 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 8888 name : linux-steplogger-logs
8989 path : src/test-project/build/test-results/*
9090 if : always()
91+ - name : Archiving coverage for sonar
92+ uses : actions/upload-artifact@v4
93+ if : always()
94+ with :
95+ name : sonar-coverage
96+ path : |
97+ src/test-project/build/test-results/**/*.xml
98+ src/test-project/build/jacoco/
9199
92100 run_on_windows :
93101 runs-on : windows-latest
Original file line number Diff line number Diff line change 2323 uses : actions/download-artifact@v4
2424 with :
2525 path : reports
26- pattern : -test-reports
26+ pattern : sonar-coverage
2727 github-token : ${{ secrets.GITHUB_TOKEN }}
2828 run-id : ${{github.event.workflow_run.id}}
2929 - name : Download PrInfo
@@ -37,13 +37,16 @@ jobs:
3737 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3838 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
3939 run : |
40+ mkdir build
41+ ls reports
42+ cp -r reports/* build/
4043 if [ '${{github.event.workflow_run.event}}' == 'pull_request' ]; then
4144 PR_NUMBER=$(<prInfo/PR)
4245 BASE_REF=$(<prInfo/base_ref)
4346 HEAD_REF=$(<prInfo/head_ref)
44- ./gradlew build sonar -Dsonar.pullrequest.base=$BASE_REF -Dsonar.pullrequest.branch=$HEAD_REF -Dsonar.pullrequest.key=$PR_NUMBER -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=${{github.repository}}
47+ ./gradlew jacocoTestReport sonar -Dsonar.pullrequest.base=$BASE_REF -Dsonar.pullrequest.branch=$HEAD_REF -Dsonar.pullrequest.key=$PR_NUMBER -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=${{github.repository}}
4548 else
46- ./gradlew build sonar
49+ ./gradlew jacocoTestReport sonar
4750 fi
4851 shell : bash
4952
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ tasks {
4646 property(" sonar.organization" , " redhat-developer" )
4747 property(" sonar.host.url" , " https://sonarcloud.io" )
4848 property(" sonar.junit.reportsPath" , layout.buildDirectory.dir(" test-results" ).get().asFile.absolutePath)
49+ property(" sonar.gradle.skipCompile" , " true" )
4950 }
5051 }
5152}
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ public void setProjectSdkIfAvailable(String targetSdkName) {
167167 String label = foundItems .values ().stream ().findFirst ().get ();
168168 projectSdkList .jList ().clickItem (label , true );
169169 // wait for 'resolving JDK' progressmonitor to end
170- waitForIgnoringError (Duration .ofSeconds (5 ), () -> remoteRobot .callJs ("true" ));
170+ waitForIgnoringError (Duration .ofSeconds (10 ), () -> remoteRobot .callJs ("true" ));
171171 } else {
172172 ScreenshotUtils .takeScreenshot (remoteRobot , "No SDK found starting with " + targetSdkName );
173173 }
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ repositories {
2626dependencies {
2727 intellijPlatform {
2828 create(IntelliJPlatformType .IntellijIdeaCommunity , platformVersion)
29- instrumentationTools()
3029 }
3130 testImplementation(" com.redhat.devtools.intellij:intellij-common-ui-test-library" )
3231 testImplementation(" org.junit.platform:junit-platform-launcher:1.10.3" )
@@ -44,6 +43,25 @@ tasks {
4443 from(" idea_license_token/idea.key" )
4544 into(" build/idea-sandbox/config-uiTest" )
4645 }
46+
47+ withType<Test > {
48+ configure<JacocoTaskExtension > {
49+ isIncludeNoLocationClasses = true
50+ excludes = listOf (" jdk.internal.*" )
51+ }
52+ }
53+
54+ jacocoTestReport {
55+ executionData.setFrom(fileTree(layout.buildDirectory).include(" /jacoco/*.exec" ))
56+ classDirectories.setFrom(instrumentCode)
57+ reports {
58+ xml.required = true
59+ }
60+ }
61+
62+ jacocoTestCoverageVerification {
63+ classDirectories.setFrom(instrumentCode)
64+ }
4765}
4866
4967val integrationUITestUltimate by intellijPlatformTesting.testIde.registering {
You can’t perform that action at this time.
0 commit comments