blob: a001a18f1d790445126598ab746289feb791ef6b [file] [log] [blame]
name: Maven
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Maven caching
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
java-package: jdk
architecture: x64
- name: Setup JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
java-package: jdk
architecture: x64
- name: Inspect environment (Linux)
if: runner.os == 'Linux'
run: env | grep '^JAVA'
- name: Build with Maven (Linux)
if: runner.os == 'Linux'
run: ./mvnw -V -B -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true --global-toolchains .github/workflows/maven-toolchains.xml verify
- name: Inspect environment (Windows)
if: runner.os == 'Windows'
run: set java
- name: Build with Maven (Windows)
if: runner.os == 'Windows'
run: ./mvnw -V -B -e -DtrimStackTrace=false "-Dmaven.test.failure.ignore=true" --global-toolchains ".github\workflows\maven-toolchains.xml" verify
- name: Publish Test Results
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}