-
Notifications
You must be signed in to change notification settings - Fork 25
36 lines (30 loc) · 929 Bytes
/
maven.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
name: Java CI
on:
push:
branches: [ development, master ]
paths-ignore:
- "docs/**"
pull_request:
branches: [ development ]
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3.2.0
- name: Set up JDK 21
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: 21
- name: Cache Maven packages
uses: actions/cache@v3.0.11
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: xvfb-run mvn package
- name: Run Sonar analysis
run: xvfb-run mvn -Dsonar.login=${{ secrets.SONAR_LOGIN }} jacoco:prepare-agent install jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:RELEASE:sonar