-
-
Notifications
You must be signed in to change notification settings - Fork 23
39 lines (34 loc) · 988 Bytes
/
main.yml
File metadata and controls
39 lines (34 loc) · 988 Bytes
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
# This is a basic workflow to help you get started with Actions
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java_version:
- '8'
- '11'
- '17'
- '21'
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java_version }}
distribution: temurin
- name: Build with Maven
run: mvn -B clean test install --file pom.xml
- name: Analyze with SonarCloud
run: |
if ["$SONAR_TOKEN" != ""]; then
mvn -B verify sonar:sonar \
-Dsonar.projectKey=tupilabs_HumanNameParser.java \
-Dsonar.organization=tupilabs \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN || true
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}