generated from pagopa/template-payments-java-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.51 KB
/
codereview.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
name: Payhub Activities - Code Review
on:
push:
branches:
- main
pull_request:
types:
- opened
- edited
- synchronize
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: 'corretto'
java-version: 17
- name: Set permissions for Gradle Wrapper
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew clean build jacocoTestReport
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sonar Scan
run: >
./gradlew sonar
-Dorg.gradle.jvmargs=-Xmx4096M
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=${{ vars.SONARCLOUD_ORG }}
-Dsonar.projectKey=${{ vars.SONARCLOUD_PROJECT_KEY }}
-Dsonar.projectName="${{ vars.SONARCLOUD_PROJECT_NAME }}"
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.sources=src/main
-Dsonar.tests=src/test
-Dsonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml
-Dsonar.exclusions='**/enums/**, **/model/**, **/dto/**, **/*Constant*, **/*Config.java, **/*Scheduler.java, **/*Application.java, **/src/test/**, **/Dummy*.java'