Skip to content

Refactor onboarding-sdk-product setting java 17 (#32) #23

Refactor onboarding-sdk-product setting java 17 (#32)

Refactor onboarding-sdk-product setting java 17 (#32) #23

Workflow file for this run

name: Code Review
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
code-review:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
module: ${{ inputs.module || env.MODULE }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar-project.properties/cache
key: ${{ runner.os }}-sonar-project.properties
restore-keys: ${{ runner.os }}-sonar-project.properties
- name: Build and analyze on Pull Requests
shell: bash
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.organization=pagopa
-Dsonar.projectKey=pagopa_selfcare-onboarding
-Dsonar.coverage.jacoco.xmlReportPaths=./target/jacoco-report/jacoco.xml
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.coverage.exclusions='**/exception/**, **/response/**, **/request/**, **/entity/**, **/utils/**, **/*Constant*, **/*Config.java, **/src/test/**'
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.base=${{ github.base_ref }}
--file ${{ inputs.module }}/pom.xml
env:
# Needed to get some information about the pull request, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}