#3473 Add Java 21 and EA to build matrix

Fix tests not running green on Java 21
Update Spring to run correctly on Java 21
This commit is contained in:
Filip Hrisafov 2023-12-18 07:35:26 +01:00 committed by GitHub
parent fa857e9ff4
commit 6d99f7b8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 11 deletions

View File

@ -17,9 +17,9 @@ jobs:
- name: 'Checkout' - name: 'Checkout'
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: 'Set up JDK' - name: 'Set up JDK'
uses: actions/setup-java@v3 uses: oracle-actions/setup-java@v1
with: with:
distribution: 'zulu' website: jdk.java.net
java-version: ${{ matrix.java }} release: EA
- name: 'Test' - name: 'Test'
run: ./mvnw ${MAVEN_ARGS} -Djacoco.skip=true install -DskipDistribution=true run: ./mvnw ${MAVEN_ARGS} -Djacoco.skip=true install -DskipDistribution=true

View File

@ -12,7 +12,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
java: [13, 17, 18] java: [17, 21]
name: 'Linux JDK ${{ matrix.java }}' name: 'Linux JDK ${{ matrix.java }}'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -25,7 +25,7 @@
<org.apache.maven.plugins.enforcer.version>3.4.1</org.apache.maven.plugins.enforcer.version> <org.apache.maven.plugins.enforcer.version>3.4.1</org.apache.maven.plugins.enforcer.version>
<org.apache.maven.plugins.surefire.version>3.2.2</org.apache.maven.plugins.surefire.version> <org.apache.maven.plugins.surefire.version>3.2.2</org.apache.maven.plugins.surefire.version>
<org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version> <org.apache.maven.plugins.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
<org.springframework.version>5.3.18</org.springframework.version> <org.springframework.version>5.3.31</org.springframework.version>
<org.eclipse.tycho.compiler-jdt.version>1.6.0</org.eclipse.tycho.compiler-jdt.version> <org.eclipse.tycho.compiler-jdt.version>1.6.0</org.eclipse.tycho.compiler-jdt.version>
<com.puppycrawl.tools.checkstyle.version>8.36.1</com.puppycrawl.tools.checkstyle.version> <com.puppycrawl.tools.checkstyle.version>8.36.1</com.puppycrawl.tools.checkstyle.version>
<org.junit.jupiter.version>5.10.1</org.junit.jupiter.version> <org.junit.jupiter.version>5.10.1</org.junit.jupiter.version>
@ -576,7 +576,7 @@
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version> <version>0.8.11</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId> <groupId>org.jvnet.jaxb2.maven2</groupId>

View File

@ -14,7 +14,6 @@ import org.joda.time.LocalDate;
import org.joda.time.LocalDateTime; import org.joda.time.LocalDateTime;
import org.joda.time.LocalTime; import org.joda.time.LocalTime;
import org.junit.jupiter.api.condition.EnabledForJreRange; import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.JRE; import org.junit.jupiter.api.condition.JRE;
import org.junitpioneer.jupiter.DefaultLocale; import org.junitpioneer.jupiter.DefaultLocale;
import org.mapstruct.ap.testutil.IssueKey; import org.mapstruct.ap.testutil.IssueKey;
@ -72,7 +71,7 @@ public class JodaConversionTest {
} }
@ProcessorTest @ProcessorTest
@EnabledOnJre(JRE.JAVA_8) @EnabledForJreRange(min = JRE.JAVA_21)
// See https://bugs.openjdk.java.net/browse/JDK-8211262, there is a difference in the default formats on Java 9+ // See https://bugs.openjdk.java.net/browse/JDK-8211262, there is a difference in the default formats on Java 9+
public void testSourceToTargetMappingForStrings() { public void testSourceToTargetMappingForStrings() {
Source src = new Source(); Source src = new Source();
@ -93,14 +92,14 @@ public class JodaConversionTest {
// and now with default mappings // and now with default mappings
target = SourceTargetMapper.INSTANCE.sourceToTargetDefaultMapping( src ); target = SourceTargetMapper.INSTANCE.sourceToTargetDefaultMapping( src );
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target.getDateTime() ).isEqualTo( "1. Januar 2014 00:00:00 UTC" ); assertThat( target.getDateTime() ).isEqualTo( "1. Januar 2014, 00:00:00 UTC" );
assertThat( target.getLocalDateTime() ).isEqualTo( "1. Januar 2014 00:00:00" ); assertThat( target.getLocalDateTime() ).isEqualTo( "1. Januar 2014, 00:00:00" );
assertThat( target.getLocalDate() ).isEqualTo( "1. Januar 2014" ); assertThat( target.getLocalDate() ).isEqualTo( "1. Januar 2014" );
assertThat( target.getLocalTime() ).isEqualTo( "00:00:00" ); assertThat( target.getLocalTime() ).isEqualTo( "00:00:00" );
} }
@ProcessorTest @ProcessorTest
@EnabledForJreRange(min = JRE.JAVA_11) @EnabledForJreRange(min = JRE.JAVA_11, max = JRE.JAVA_17)
// See https://bugs.openjdk.java.net/browse/JDK-8211262, there is a difference in the default formats on Java 9+ // See https://bugs.openjdk.java.net/browse/JDK-8211262, there is a difference in the default formats on Java 9+
public void testSourceToTargetMappingForStringsJdk11() { public void testSourceToTargetMappingForStringsJdk11() {
Source src = new Source(); Source src = new Source();