-
Notifications
You must be signed in to change notification settings - Fork 19
48 lines (40 loc) · 1.02 KB
/
pull_request.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
46
47
48
name: Pull Request
on:
pull_request:
branches:
- 'main'
- 'hotfix/v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21' ]
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Check style
run: mvn checkstyle:check
- name: Build
run: mvn clean compile
- name: Test
run: mvn test
- name: Publish test report
if: always()
uses: mikepenz/action-junit-report@v5
with:
report_paths: '**/target/surefire-reports/TEST-*.xml'
- name: Sonar
if: matrix.java == '17'
run: mvn verify sonar:sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}