Skip to content

Commit

Permalink
fix: fix build for next IJ version and fix Sonar coverage, bumping gr…
Browse files Browse the repository at this point in the history
…adle (#597)

* fix: fix build for next IJ version

Signed-off-by: Stephane Bouchet <[email protected]>

* chore: remove old IJ version from matrix

Signed-off-by: Stephane Bouchet <[email protected]>

* chore: fix sonar analysis

Signed-off-by: Stephane Bouchet <[email protected]>

* chore: publish tests results

Signed-off-by: Stephane Bouchet <[email protected]>

* chore: fix next IJ

Signed-off-by: Stephane Bouchet <[email protected]>

* update and fix local integrationTest

Signed-off-by: Stephane Bouchet <[email protected]>

---------

Signed-off-by: Stephane Bouchet <[email protected]>
  • Loading branch information
sbouchet authored Nov 17, 2023
1 parent a97717f commit 5de882c
Show file tree
Hide file tree
Showing 10 changed files with 210 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate_IJ_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
IJ: [IU-2021.1, IU-2021.2, IU-2021.3, IU-2022.1, IU-2022.2, IU-2022.3, IU-2023.1, IU-2023.2]
IJ: [ IU-2021.2, IU-2021.3, IU-2022.1, IU-2022.2, IU-2022.3, IU-2023.1, IU-2023.2 ]

steps:
- name: Checkout Code
Expand Down
44 changes: 23 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ buildscript {
}

plugins {
id 'org.jetbrains.intellij' version '1.15.0'
id 'org.jetbrains.intellij' version '1.16.0'
id 'com.adarshr.test-logger' version '3.2.0'
id 'idea'
id 'java'
id 'jacoco'
id 'org.sonarqube' version '3.0'
id 'org.sonarqube' version '4.4.1.3373'
}

repositories {
Expand Down Expand Up @@ -89,11 +89,14 @@ sourceSets {
}

test {
systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug'
jvmArgs "-Djava.awt.headless=true"

// Discover and execute JUnit4-based tests
useJUnit()
systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug'
jvmArgs "-Djava.awt.headless=true"
jacoco {
includeNoLocationClasses = true
excludes = ["jdk.internal.*"]
}
}

tasks.register('integrationTest', Test) {
Expand All @@ -110,6 +113,7 @@ tasks.register('integrationTest', Test) {
showFailedStandardStreams true
showFullStackTraces true
}
jvmArgs "-Djava.awt.headless=true"
}

tasks.register('integrationUITest', Test) {
Expand All @@ -129,46 +133,43 @@ tasks.register('integrationUITest', Test) {
showFailedStandardStreams true
showFullStackTraces true
}
jvmArgs "-Djava.awt.headless=true"
}

dependencies {
implementation(
'io.fabric8:openshift-client:6.4.1',
'org.apache.commons:commons-compress:1.21',
'org.apache.commons:commons-exec:1.3',
'org.apache.commons:commons-lang3:3.9',
'com.redhat.devtools.intellij:intellij-common:1.9.3-SNAPSHOT',
'io.jsonwebtoken:jjwt-impl:0.11.2',
'io.jsonwebtoken:jjwt-jackson:0.11.2',
'org.keycloak:keycloak-installed-adapter:20.0.5',
'org.keycloak:keycloak-installed-adapter:22.0.1',
'com.squareup.retrofit2:converter-jackson:2.9.0',
'com.google.code.gson:gson:2.9.0')
testImplementation(
'org.junit.platform:junit-platform-launcher:1.8.2',
'org.mockito:mockito-core:4.9.0',
'org.junit.platform:junit-platform-launcher:1.10.0',
'org.mockito:mockito-core:4.11.0',
'org.easytesting:fest-assert:1.4',
'com.redhat.devtools.intellij:intellij-common:1.9.3-SNAPSHOT:test',
'org.awaitility:awaitility:4.1.0',
'org.awaitility:awaitility:4.2.0',
'org.mock-server:mockserver-client-java:5.15.0',
'org.mock-server:mockserver-netty:5.15.0',
'com.redhat.devtools.intellij:intellij-common-ui-test-library:0.2.0',
'org.junit.jupiter:junit-jupiter-engine:5.8.2',
'org.junit.jupiter:junit-jupiter-api:5.8.2',
'org.junit.jupiter:junit-jupiter:5.8.2')
'org.junit.jupiter:junit-jupiter-engine:5.10.0',
'org.junit.jupiter:junit-jupiter-api:5.10.0',
'org.junit.jupiter:junit-jupiter:5.10.0')
constraints {
implementation('io.undertow:undertow-core:2.2.24.Final') {
implementation('io.undertow:undertow-core:2.3.7.Final') { //keycloak
because 'https://app.snyk.io/vuln/SNYK-JAVA-IOUNDERTOW-3339519'
}
implementation('com.squareup.okhttp3:okhttp:4.9.2') {
implementation('com.squareup.okhttp3:okhttp:4.10.0') { //retrofit
because 'https://app.snyk.io/vuln/SNYK-JAVA-COMSQUAREUPOKHTTP3-2958044'
}
implementation('org.jboss.resteasy:resteasy-core:4.7.8.Final') {
because 'https://app.snyk.io/vuln/SNYK-JAVA-ORGJBOSSRESTEASY-3338627'
}
implementation('org.jboss.xnio:xnio-api:3.8.8.Final') {
implementation('org.jboss.xnio:xnio-api:3.8.9.Final') { //keycloak
because 'https://app.snyk.io/vuln/SNYK-JAVA-ORGJBOSSXNIO-2994360'
}
testImplementation('maven:junit:junit:4.13.1') {
testImplementation('maven:junit:junit:4.13.1') { //intellij-common-ui-test-library
because 'https://github.com/advisories/GHSA-269g-pwp5-87pp'
}
}
Expand All @@ -180,13 +181,14 @@ sonarqube {
property "sonar.organization", "redhat-developer"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.junit.reportsPath", "$buildDir/test-results/"
property "sonar.gradle.skipCompile", "true"
}
}

jacocoTestReport {
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
reports {
xml.getRequired().set true
xml.required = true
}
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 5de882c

Please sign in to comment.