-
Notifications
You must be signed in to change notification settings - Fork 137
34 lines (33 loc) · 927 Bytes
/
testing.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
name: Testing
on:
push:
branches: [master]
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
jobs:
MavenTests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' , '21' ]
name: Java ${{ matrix.Java }} testing
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Testing with Maven
run: mvn -B clean verify
- name: SonarCloud
run: mvn -B sonar:sonar
if: ${{ matrix.java == '17' && env.SONAR_TOKEN != null}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}