| name: CI |
| |
| on: [push, pull_request] |
| |
| jobs: |
| build: |
| |
| runs-on: ${{ matrix.os }} |
| |
| strategy: |
| matrix: |
| os: [ubuntu-latest, windows-latest, macos-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@v2.1.0 |
| with: |
| distribution: 'adopt' |
| java-version: 11 |
| java-package: jdk |
| architecture: x64 |
| |
| - name: Inspect environment (Linux) |
| if: runner.os == 'Linux' |
| run: env | grep '^JAVA' |
| |
| - name: Build with Maven (Linux) |
| timeout-minutes: 60 |
| if: runner.os == 'Linux' |
| continue-on-error: true |
| run: ./mvnw -V -B --no-transfer-progress -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true -Dsurefire.rerunFailingTestsCount=1 verify |
| |
| - name: Inspect environment (Windows) |
| if: runner.os == 'Windows' |
| run: set java |
| |
| - name: Build with Maven (Windows) |
| timeout-minutes: 60 |
| if: runner.os == 'Windows' |
| continue-on-error: true |
| run: ./mvnw -V -B --no-transfer-progress -e "-DtrimStackTrace=false" "-Dmaven.test.failure.ignore=true" "-Dsurefire.rerunFailingTestsCount=1" "-Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000" verify |
| |
| - name: Inspect environment (MacOS) |
| if: runner.os == 'macOS' |
| run: env | grep '^JAVA' |
| |
| - name: Build with Maven (MacOS) |
| timeout-minutes: 60 |
| if: runner.os == 'macOS' |
| continue-on-error: true |
| run: ./mvnw -V -B --no-transfer-progress -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true -Dsurefire.rerunFailingTestsCount=1 verify |
| |
| - name: Publish Test Results |
| uses: scacap/action-surefire-report@v1 |
| with: |
| github_token: ${{ secrets.GITHUB_TOKEN }} |
| check_name: Test Report (${{ matrix.os }}) |
| report_paths: '**/*-reports/TEST-*.xml' |
| |
| - name: Upload Test Reports |
| uses: actions/upload-artifact@v2 |
| with: |
| name: test-reports-${{ matrix.os }} |
| path: '**/*-reports' |