-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (42 loc) · 1.13 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# based on https://github.com/actions/setup-java
#
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
strategy:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
java: [ 11, 17 ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Cache maven artifacts
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B verify --file pom.xml
- name: Archive test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results
path: |
target/surefire-reports/
- name: Publish Test Report
if: ${{ always() }}
uses: scacap/action-surefire-report@v1