Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 36 additions & 21 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,44 @@ jobs:
strategy:
fail-fast: false
matrix:
# Each Vaadin runtime is exercised on the JDK that matches its baseline.
# Vaadin 14/23/24 run on Java 17; Vaadin 25 is compiled to Java 21 bytecode
# and only loads on Java 21, so it must be built and tested there.
# (maven.compiler.source/target=1.8 sets bytecode level only, not the runtime JDK.)
# Each job tests the module whose Vaadin baseline matches that JDK exactly:
# tests-v14 -> Java 8, tests-v23 -> Java 11, tests-v24 -> Java 17, tests-v25 -> Java 21
# Compilation always needs Java 17+ (the shared *Test25 sources reference Jackson 3,
# which is Java 17 bytecode), so the 8/11 jobs compile on JDK 17 and fork the
# surefire test JVM onto the target runtime via -Djvm.
include:
- vaadin: '14'
java: '17'
- vaadin: '23'
java: '17'
- vaadin: '24'
java: '17'
- vaadin: '25'
java: '21'
name: Vaadin ${{ matrix.vaadin }} (JDK ${{ matrix.java }})
- run-java: '8'
build-java: '17'
module: tests-v14
test-jvm: -Djvm=$JAVA_HOME_8_X64/bin/java
- run-java: '11'
build-java: '17'
module: tests-v23
test-jvm: -Djvm=$JAVA_HOME_11_X64/bin/java
- run-java: '17'
build-java: '17'
module: tests-v24
test-jvm: ''
- run-java: '21'
build-java: '21'
module: tests-v25
test-jvm: ''
name: JDK ${{ matrix.run-java }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
- uses: actions/checkout@v6
- name: Set up runtime JDK ${{ matrix.run-java }}
if: matrix.run-java != matrix.build-java
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: ${{ matrix.run-java }}
distribution: 'temurin'
# Installed last so it becomes the default JAVA_HOME used by Maven; the runtime
# JDK above remains available as JAVA_HOME_<version>_X64 for the -Djvm fork.
- name: Set up build JDK ${{ matrix.build-java }}
uses: actions/setup-java@v5
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
java-version: ${{ matrix.build-java }}
distribution: 'temurin'
cache: maven
# Build only this version's test module plus its upstream (core, tests-shared)
# via -am, so the module compiles and its suite runs on the matching JDK.
- name: Build (Vaadin ${{ matrix.vaadin }})
run: mvn -B package -pl tests-v${{ matrix.vaadin }} -am
- name: Build and test (JDK ${{ matrix.run-java }} runtime)
run: mvn -B package -pl ${{ matrix.module }} -am ${{ matrix.test-jvm }}
9 changes: 4 additions & 5 deletions tests-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,17 @@
<!--
Default test selection (inherited by tests-v14/v23/v24): the legacy/elemental
(*Test24) suites plus the always-on common suites. The tests-v25 module overrides
this to run the Jackson (*Test25) suites instead.

JsonMigrationHelper25Test ends in "25Test" (not "Test25"), so it is not matched by
the *Test25 glob and is listed explicitly as a common suite.
this to run the Jackson (*Test25) suites instead, plus JsonMigrationHelper25Test:
that suite exercises the Jackson-backed helper, which is only the active
implementation on Vaadin 25 (and Jackson 3 requires Java 17+ anyway, while the
v14/v23 modules must be runnable on their Java 8/11 baselines).
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test24.java</include>
<include>**/JsonMigrationHelper25Test.java</include>
<include>**/LitRendererMigrationExtensionTest.java</include>
</includes>
</configuration>
Expand Down
Loading