-
Notifications
You must be signed in to change notification settings - Fork 128
49 lines (46 loc) · 1.26 KB
/
build-and-test.yml
File metadata and controls
49 lines (46 loc) · 1.26 KB
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
46
47
48
49
name: Build and Test
on:
# Handle all branches for now
push:
pull_request:
workflow_dispatch:
# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ['17', '21', '25']
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Build with Maven and run tests
run: mvn -B package --file pom.xml -fae
- name: Upload Test Reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: surefire-reports-java-${{ matrix.java-version }}
path: |
**/target/surefire-reports/
**/target/failsafe-reports/
retention-days: 7
if-no-files-found: warn
- name: Upload Build Logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs-java-${{ matrix.java-version }}
path: |
**/target/*.log
**/target/quarkus.log
retention-days: 3
if-no-files-found: ignore