generated from pagopa/pagopa-functions-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added code review for functions * add sonar token * properties default value * add plugin sonar to parent * add code review worfflow * test removing if pull_request * fix reference ms * sonat_token and coverage exclusions * replace for code review ms * code review for all * added request and response to exclusions * remove code review workflow for single module
Showing
6 changed files
with
105 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Code Review | ||
|
||
# Controls when the workflow will run | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- 'onboarding-ms/**' | ||
- 'onboarding-functions/**' | ||
- 'onboarding-sdk/**' | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
deployments: write | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
||
code-review: | ||
name: Code Review onboarding-ms | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# 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 ./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 }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
onboarding-functions/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters