[MNG-6949] Run integration tests on large matrix, build on small one.

Integration tests now run on Java 8, 11 and 14 with Windows, macOS and Linux.
This commit is contained in:
Maarten Mulders 2020-07-01 11:30:40 +02:00 committed by Sylwester Lachiewicz
parent c9d1788f76
commit 3b442badfc
1 changed files with 17 additions and 8 deletions

View File

@ -24,7 +24,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
java: [8, 11, 14]
fail-fast: false
runs-on: ${{ matrix.os }}
@ -37,36 +36,40 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
key: maven-${{ matrix.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ matrix.os }}-java${{ matrix.java }}-
maven-${{ matrix.os }}-
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
java-version: 8
- name: Build with Maven
run: mvn verify -e -B -V -DdistributionFileName=apache-maven
- name: Upload built Maven
uses: actions/upload-artifact@v2
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java == '11' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
name: built-maven
path: apache-maven/target/
- name: Upload built Maven Wrapper
uses: actions/upload-artifact@v2
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java == '11' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
name: built-maven-wrapper
path: maven-wrapper/target/maven-wrapper.jar
integration-test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
java: [8, 11, 14]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Collect environment context variables
@ -112,5 +115,11 @@ jobs:
name: built-maven-wrapper
path: built-maven-wrapper/
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Running integration tests
run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local=$GITHUB_WORKSPACE/repo/ -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -DwrapperDistroDir="$GITHUB_WORKSPACE/built-maven/" -DmavenWrapper="$GITHUB_WORKSPACE/built-maven-wrapper/maven-wrapper.jar" -f maven-integration-testing/pom.xml
shell: bash
run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local=$GITHUB_WORKSPACE/repo/ -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -DwrapperDistroDir="$GITHUB_WORKSPACE/built-maven/" -DmavenWrapper="$GITHUB_WORKSPACE/built-maven-wrapper/maven-wrapper.jar" -f maven-integration-testing/pom.xml