-
Notifications
You must be signed in to change notification settings - Fork 83
47 lines (39 loc) · 1.07 KB
/
unit-tests.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
name: Unit Tests
on:
workflow_dispatch:
pull_request:
branches:
- 'master'
- 'develop'
push:
branches:
- 'master'
- 'develop'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'liberica'
cache: maven
- name: Maven Tests
run: mvn --batch-mode clean test
- name: Test Coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: SonarCloud Analyze
run: >
mvn --batch-mode sonar:sonar
-Dsonar.projectKey=spacious-team_investbook
-Dsonar.organization=spacious-team
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=$SONAR_TOKEN
-Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco/jacoco.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}