-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (45 loc) · 1.44 KB
/
pullrequest.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
49
50
51
name: AxonServer Connector Java
on:
pull_request:
jobs:
build:
name: Test and Build on JDK ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- java-version: 8
sonar-enabled: false
- java-version: 11
sonar-enabled: true
fail-fast: false # run both to the end
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
cache: "maven"
server-id: sonatype
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Maven operation with Sonar
if: matrix.sonar-enabled
run: |
mvn -B -U -Dstyle.color=always -Possrh -Pcoverage \
clean verify \
sonar:sonar \
-Dsonar.projectKey=AxonIQ_axonserver-connector-java \
-Dsonar.organization=axoniq \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Maven operation without Sonar
if: matrix.sonar-enabled != true
run: |
mvn -B -U -Dstyle.color=always -Possrh clean verify
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}