kopia lustrzana https://github.com/JOSM/MapWithAI
CI: Update highest Java version to 17
Signed-off-by: Taylor Smock <tsmock@fb.com>pull/1/head
rodzic
5930019995
commit
357a4fadd0
|
@ -51,9 +51,9 @@ assemble with java 11:
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
assemble with java 15:
|
assemble with java 17:
|
||||||
stage: build
|
stage: build
|
||||||
image: registry.gitlab.com/josm/docker-library/openjdk-15-josmplugin:latest
|
image: registry.gitlab.com/josm/docker-library/openjdk-17-josmplugin:latest
|
||||||
script:
|
script:
|
||||||
- ./gradlew assemble --stacktrace
|
- ./gradlew assemble --stacktrace
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -119,8 +119,7 @@ coverage:
|
||||||
- test
|
- test
|
||||||
image: haynes/jacoco2cobertura:1.0.7
|
image: haynes/jacoco2cobertura:1.0.7
|
||||||
script:
|
script:
|
||||||
- 'python /opt/cover2cover.py build/reports/jacoco/test/jacocoTestReport.xml src/main/java > build/reports/jacoco/test/coverage.xml'
|
- python /opt/cover2cover.py build/reports/jacoco/test/jacocoTestReport.xml $CI_PROJECT_DIR/src/main/java/ > build/reports/jacoco/test/coverage.xml
|
||||||
- 'python /opt/source2filename.py build/reports/jacoco/test/coverage.xml'
|
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
cobertura: "build/reports/jacoco/test/coverage.xml"
|
cobertura: "build/reports/jacoco/test/coverage.xml"
|
||||||
|
@ -155,16 +154,16 @@ build with java 11:
|
||||||
- assemble with java 11
|
- assemble with java 11
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
build with java 15:
|
build with java 17:
|
||||||
stage: test
|
stage: test
|
||||||
image: registry.gitlab.com/josm/docker-library/openjdk-15-josmplugin:latest
|
image: registry.gitlab.com/josm/docker-library/openjdk-17-josmplugin:latest
|
||||||
script:
|
script:
|
||||||
- ./gradlew build --stacktrace
|
- ./gradlew build --stacktrace
|
||||||
needs: ["java 15 assemble"]
|
needs: ["java 17 assemble"]
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
needs: ["assemble with java 15"]
|
needs: ["assemble with java 17"]
|
||||||
dependencies:
|
dependencies:
|
||||||
- assemble with java 15
|
- assemble with java 17
|
||||||
interruptible: true
|
interruptible: true
|
||||||
|
|
||||||
################
|
################
|
||||||
|
|
26
build.gradle
26
build.gradle
|
@ -5,18 +5,18 @@ import java.nio.file.Files
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "com.diffplug.spotless" version "5.15.2"
|
||||||
|
id "com.github.ben-manes.versions" version "0.39.0"
|
||||||
|
id "com.github.spotbugs" version "4.7.6"
|
||||||
|
// id "de.aaschmid.cpd" version "3.3"
|
||||||
id "eclipse"
|
id "eclipse"
|
||||||
id "jacoco"
|
id "jacoco"
|
||||||
|
id "java"
|
||||||
id "maven-publish"
|
id "maven-publish"
|
||||||
id "pmd"
|
|
||||||
id "com.github.ben-manes.versions" version "0.39.0"
|
|
||||||
id "com.github.spotbugs" version "4.7.3"
|
|
||||||
id "org.openstreetmap.josm" version "0.7.1"
|
|
||||||
id "net.ltgt.errorprone" version "2.0.2"
|
id "net.ltgt.errorprone" version "2.0.2"
|
||||||
id "com.diffplug.spotless" version "5.15.0"
|
id "org.openstreetmap.josm" version "0.7.1"
|
||||||
id "org.sonarqube" version "3.3"
|
id "org.sonarqube" version "3.3"
|
||||||
//id 'de.aaschmid.cpd' version '2.0'
|
id "pmd"
|
||||||
}
|
}
|
||||||
|
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
@ -78,9 +78,9 @@ def versions = [
|
||||||
errorprone: "2.9.0",
|
errorprone: "2.9.0",
|
||||||
jacoco: "0.8.5",
|
jacoco: "0.8.5",
|
||||||
jmockit: "1.49",
|
jmockit: "1.49",
|
||||||
junit: "5.7.2",
|
junit: "5.8.1",
|
||||||
pmd: "6.20.0",
|
pmd: "6.20.0",
|
||||||
spotbugs: "4.4.0",
|
spotbugs: "4.4.1",
|
||||||
wiremock: "2.27.2",
|
wiremock: "2.27.2",
|
||||||
findsecbugs: "1.11.0",
|
findsecbugs: "1.11.0",
|
||||||
]
|
]
|
||||||
|
@ -168,14 +168,14 @@ jacocoTestCoverageVerification {
|
||||||
|
|
||||||
spotless {
|
spotless {
|
||||||
java {
|
java {
|
||||||
|
eclipse().configFile "config/josm_formatting.xml"
|
||||||
|
endWithNewline()
|
||||||
|
importOrder('javax', 'java', 'org', 'com', '')
|
||||||
|
indentWithSpaces(4)
|
||||||
licenseHeader "// License: GPL. For details, see LICENSE file."
|
licenseHeader "// License: GPL. For details, see LICENSE file."
|
||||||
ratchetFrom("origin/master")
|
ratchetFrom("origin/master")
|
||||||
removeUnusedImports()
|
removeUnusedImports()
|
||||||
endWithNewline()
|
|
||||||
indentWithSpaces(4)
|
|
||||||
eclipse().configFile "config/josm_formatting.xml"
|
|
||||||
trimTrailingWhitespace()
|
trimTrailingWhitespace()
|
||||||
importOrder("java", "javax", "")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,6 @@ import java.util.Objects;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.github.tomakehurst.wiremock.WireMockServer;
|
|
||||||
import com.github.tomakehurst.wiremock.common.FileSource;
|
|
||||||
import com.github.tomakehurst.wiremock.extension.Parameters;
|
|
||||||
import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
|
|
||||||
import com.github.tomakehurst.wiremock.http.Request;
|
|
||||||
import com.github.tomakehurst.wiremock.http.Response;
|
|
||||||
import org.awaitility.Awaitility;
|
import org.awaitility.Awaitility;
|
||||||
import org.awaitility.Durations;
|
import org.awaitility.Durations;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
@ -30,6 +24,13 @@ import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
|
||||||
import org.openstreetmap.josm.testutils.annotations.BasicWiremock;
|
import org.openstreetmap.josm.testutils.annotations.BasicWiremock;
|
||||||
import org.openstreetmap.josm.testutils.annotations.HTTP;
|
import org.openstreetmap.josm.testutils.annotations.HTTP;
|
||||||
|
|
||||||
|
import com.github.tomakehurst.wiremock.WireMockServer;
|
||||||
|
import com.github.tomakehurst.wiremock.common.FileSource;
|
||||||
|
import com.github.tomakehurst.wiremock.extension.Parameters;
|
||||||
|
import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
|
||||||
|
import com.github.tomakehurst.wiremock.http.Request;
|
||||||
|
import com.github.tomakehurst.wiremock.http.Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test annotation to ensure that wiremock is used
|
* Test annotation to ensure that wiremock is used
|
||||||
*
|
*
|
||||||
|
@ -91,7 +92,7 @@ public @interface Wiremock {
|
||||||
* @param context The context to search
|
* @param context The context to search
|
||||||
* @return The wiremock server
|
* @return The wiremock server
|
||||||
*/
|
*/
|
||||||
static WireMockServer getWiremock(ExtensionContext context) {
|
public static WireMockServer getWiremock(ExtensionContext context) {
|
||||||
ExtensionContext.Namespace namespace = ExtensionContext.Namespace.create(BasicWiremock.class);
|
ExtensionContext.Namespace namespace = ExtensionContext.Namespace.create(BasicWiremock.class);
|
||||||
return context.getStore(namespace).get(WireMockServer.class, WireMockServer.class);
|
return context.getStore(namespace).get(WireMockServer.class, WireMockServer.class);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue