-
Notifications
You must be signed in to change notification settings - Fork 3
90 lines (75 loc) · 2.05 KB
/
Copy pathci-push.yml
File metadata and controls
90 lines (75 loc) · 2.05 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI (push)
on:
push:
branches: [ main, develop, 'feature/**' ]
permissions:
contents: read
checks: write
jobs:
build:
name: Build & Test (Java ${{ matrix.java }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '17', '21' ]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build and test with Maven
run: mvn -B clean verify -Pqa -Ddependency-check.skip=true
- name: Upload unit test XMLs
uses: actions/upload-artifact@v6
if: always()
with:
name: unit-xml-java-${{ matrix.java }}
path: |
**/target/surefire-reports/TEST-*.xml
**/target/*-reports/TEST-*.xml
retention-days: 7
styleguard:
name: Aether Style Guard
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Run Aether Style Guard
run: mvn -B clean compile -Pstyleguard -Ddependency-check.skip=true
unit-report:
name: Unit Test Report
runs-on: ubuntu-latest
needs: build
if: always()
permissions:
contents: read
checks: write
steps:
- name: Download unit XMLs (all Java versions)
uses: actions/download-artifact@v7
with:
pattern: unit-xml-java-*
merge-multiple: true
path: reports/unit
- name: Publish Unit Test Report
uses: mikepenz/action-junit-report@v6
if: always()
with:
report_paths: 'reports/unit/**/TEST-*.xml'
check_name: Unit Test Report