Skip to content

Commit

Permalink
Improve cross-version testing
Browse files Browse the repository at this point in the history
  • Loading branch information
scordio committed Jul 28, 2024
1 parent 5d75793 commit fcf30e5
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 25 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/cross-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,27 @@ env:

jobs:

java_17:
java:

name: Java 17
name: Java ${{ matrix.java }}
strategy:
fail-fast: false
matrix:
java: [ 8, 11, 17 ]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: maven
- name: Test
run: ./mvnw $MAVEN_ARGS verify

java:
java-oracle:

name: Java ${{ matrix.java }}
strategy:
Expand All @@ -42,3 +46,23 @@ jobs:
version: latest
- name: Test
run: ./mvnw $MAVEN_ARGS verify

junit:

name: JUnit Jupiter ${{ matrix.junit-jupiter }}
strategy:
fail-fast: false
matrix:
junit-jupiter: [5.10.0, 5.10.3, 5.11.0-M2]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
cache: maven
- name: Test
run: ./mvnw $MAVEN_ARGS -Djunit-jupiter.version=${{ matrix.junit-jupiter }} verify
52 changes: 31 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,6 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<googleJavaFormat/>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
</java>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down Expand Up @@ -208,6 +187,37 @@
</build>

<profiles>
<profile>
<id>spotless</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<googleJavaFormat/>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
</java>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<properties>
Expand Down

0 comments on commit fcf30e5

Please sign in to comment.