Skip to content

Commit

Permalink
Upgrade to Spring 6 for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr committed Sep 2, 2024
1 parent 5232df2 commit 6186d89
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 30 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,68 +24,61 @@ jobs:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: 'Test'
run: ./mvnw ${MAVEN_ARGS} -Djacoco.skip=true install -DskipDistribution=true
linux:
name: 'Linux JDK 11'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Set up JDK 11'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- name: 'Test'
run: ./mvnw ${MAVEN_ARGS} install
run: ./mvnw ${MAVEN_ARGS} -Djacoco.skip=${{ matrix.java != 17 }} install -DskipDistribution=${{ matrix.java != 17 }}
- name: 'Generate coverage report'
if: matrix.java == 17
run: ./mvnw jacoco:report
- name: 'Upload coverage to Codecov'
if: matrix.java == 17
uses: codecov/codecov-action@v2
- name: 'Publish Snapshots'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'mapstruct/mapstruct'
if: matrix.java == 17 && github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'mapstruct/mapstruct'
run: ./mvnw -s etc/ci-settings.xml -DskipTests=true -DskipDistribution=true deploy
linux-jdk-8:
name: 'Linux JDK 8'
integration_test_jdk:
strategy:
fail-fast: false
matrix:
java: [ 8, 11 ]
name: 'Linux JDK ${{ matrix.java }}'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Set up JDK 11 for building everything'
- name: 'Set up JDK 17 for building everything'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17
- name: 'Install Processor'
run: ./mvnw ${MAVEN_ARGS} -DskipTests install -pl processor -am
- name: 'Set up JDK 8 for running integration tests'
- name: 'Set up JDK ${{ matrix.java }} for running integration tests'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
java-version: ${{ matrix.java }}
- name: 'Run integration tests'
run: ./mvnw ${MAVEN_ARGS} verify -pl integrationtest
windows:
name: 'Windows'
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: 'Set up JDK 11'
- name: 'Set up JDK 17'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17
- name: 'Test'
run: ./mvnw %MAVEN_ARGS% install
mac:
name: 'Mac OS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: 'Set up JDK 11'
- name: 'Set up JDK 17'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17
- name: 'Test'
run: ./mvnw ${MAVEN_ARGS} install
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'zulu'
cache: maven

Expand Down
4 changes: 2 additions & 2 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<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.javadoc.version>3.1.0</org.apache.maven.plugins.javadoc.version>
<org.springframework.version>5.3.31</org.springframework.version>
<org.springframework.version>6.1.12</org.springframework.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>
<org.junit.jupiter.version>5.10.1</org.junit.jupiter.version>
Expand All @@ -47,7 +47,7 @@
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<!--
The minimum Java Version that is needed to build a module in MapStruct.
The processor module needs at least Java 11.
The processor module needs at least Java 17.
-->
<minimum.java.version>1.8</minimum.java.version>
<protobuf.version>3.21.7</protobuf.version>
Expand Down
2 changes: 1 addition & 1 deletion processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<!-- Netbeans has a problem when we use late binding with @ in the surefire arg line.
Therefore we set this empty property here-->
<jacocoArgLine />
<minimum.java.version>11</minimum.java.version>
<minimum.java.version>17</minimum.java.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ To learn more about MapStruct, refer to the [project homepage](https://mapstruct

## Building from Source

MapStruct uses Maven for its build. Java 11 is required for building MapStruct from source. To build the complete project, run
MapStruct uses Maven for its build. Java 17 is required for building MapStruct from source. To build the complete project, run

./mvnw clean install

Expand Down

0 comments on commit 6186d89

Please sign in to comment.