-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.05 KB
/
maven.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
name: Maven build
on:
push:
branches: [ "main" ]
paths-ignore:
- README.md
pull_request:
types: [ opened, synchronize, reopened ]
paths-ignore:
- README.md
workflow_dispatch:
permissions:
contents: read
actions: read
checks: write
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 8, 11, 17, 21 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: Build with Maven
run: mvn -B package
- name: Report tests
uses: dorny/[email protected]
if: success() || failure()
with:
name: JUnit Tests
working-directory: 'target/surefire-reports'
path: TEST-*.xml
reporter: java-junit
only-summary: 'true'