Repository navigation
57 lines (54 loc) · 1.72 KB
/
Copy pathbuild-and-test.yml
File metadata and controls
57 lines (54 loc) · 1.72 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
50
51
52
53
54
55
56
57
name: Build and Test
on:
# Handle all branches for now
push:
paths-ignore:
- '**/docs/**'
pull_request:
paths-ignore:
- '**/docs/**'
workflow_dispatch:
# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java-version: ['17', '21', '25']
include:
- os: windows-latest
java-version: '17'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
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 ${{ matrix.os == 'windows-latest' && '-DskipDockerTests=true' || '' }}
- name: Upload Test Reports
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: surefire-reports-${{ matrix.os }}-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@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: build-logs-${{ matrix.os }}-java-${{ matrix.java-version }}
path: |
**/target/*.log
**/target/quarkus.log
retention-days: 3
if-no-files-found: ignore