Adjust excludes and min tests version for some integration tests #455
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 | |
jobs: | |
test_jdk: | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [17, 21] | |
name: 'Linux JDK ${{ matrix.java }}' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Set up JDK' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: 'Test' | |
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: 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 | |
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 17 for building everything' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: 'Install Processor' | |
run: ./mvnw ${MAVEN_ARGS} -DskipTests install -pl processor -am | |
- name: 'Set up JDK ${{ matrix.java }} for running integration tests' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
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 17' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
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 17' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: 'Test' | |
run: ./mvnw ${MAVEN_ARGS} install |