-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.38 KB
/
master.yml
File metadata and controls
61 lines (50 loc) · 1.38 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
name: Master CI v1
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-scan:
name: SonarCloud Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: 'temurin'
cache: maven
- name: Build/Test & SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
run: mvn -B clean verify -Pcoverage,sonar -Dsonar.token=$SONAR_TOKEN
build-test:
name: Build & Test - JDK ${{ matrix.java }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java: ['8', '11', '17', '21', '25']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Show Versions
run: mvn -version
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ matrix.java }}
restore-keys: ${{ runner.os }}-m2-
- name: Build/Test
run: mvn -B clean package