Skip to content

[EC-78] Import pipelines and code from develop to main #48

[EC-78] Import pipelines and code from develop to main

[EC-78] Import pipelines and code from develop to main #48

name: Code Review onboarding-ms
# Controls when the workflow will run
on:
pull_request:
branches:
- main
- develop
types:
- opened
- synchronize
- reopened
paths:
- 'onboarding-ms/**'
- '.github/workflows/code_review_onboarding_ms.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
id-token: write
contents: read
deployments: write
packages: read
env:
GITHUB_TOKEN_READ_PACKAGES: ${{ secrets.GITHUB_TOKEN }}
# 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
permissions:
packages: read
id-token: write
contents: read
# 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:
- name: Setup Maven Action
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # [email protected]
with:
checkout-fetch-depth: 0
java-version: 17
java-distribution: 'temurin'
maven-version: '3.9.5'
cache-enabled: false
checkout-token: ${{ secrets.GITHUB_TOKEN }}
settings-servers: '[{"id": "selfcare-github", "username": "user", "password": "${GITHUB_TOKEN_REF}"}]'
# - name: Build and analyze on Pull Requests
# shell: bash
# run: |
# mvn --projects :test-coverage --also-make verify -Ponboarding-ms,report,coverage \
# -Dsonar.organization=pagopa \
# -Dsonar.projectKey=pagopa_selfcare-onboarding \
# -Dsonar.token=${{ secrets.SONAR_TOKEN }} \
# -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
# -Dsonar.pullrequest.branch=${{ github.head_ref }} \
# -Dsonar.pullrequest.base=refs/remotes/origin/${{ github.base_ref }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Launch unit test with Maven
working-directory: ./apps/onboarding-ms/pom.xml
run: mvn test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN_REF: ${{ secrets.GH_PAT }}