Skip to content

hotfix: [PPANTT-113] Station and Channel code generation (#498) #474

hotfix: [PPANTT-113] Station and Channel code generation (#498)

hotfix: [PPANTT-113] Station and Channel code generation (#498) #474

name: Code Review
# Controls when the workflow will run
on:
merge_group:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
PROJECT_KEY: pagopa_pagopa-selfcare-ms-backoffice-backend
permissions:
id-token: write
packages: write
contents: write
deployments: write
issues: write
pull-requests: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
print_debug:
runs-on: ubuntu-latest
steps:
- name: Dump Inputs
env:
JSON_INPUTS: ${{ toJson(inputs) }}
run: echo "$JSON_INPUTS"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
code-review:
name: Code Review
# 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: Test and Coverage
uses: pagopa/github-actions-template/maven-code-review@186af0dfc5ee51e6150046051d4e0b6444e15aed # v1.10.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
project_key: ${{env.PROJECT_KEY}}
coverage_exclusions: "**/config/*,**/*Mock*,**/model/**,**/entity/*,**/exception/*"
cpd_exclusions: "**/model/**,**/entity/*"
java_version: 17
# image:
# name: Build and Push Docker Image
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
#
# - name: Login to GitHub Container Registry
# uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
# with:
# images: ghcr.io/${{ github.repository }}
# tags: |
# ${{ github.event.number }}
# ${{ inputs.tag }}
# type=ref,event=branch
# type=sha
#
# - name: Build and push
# uses: docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6 # v3
# with:
# context: .
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
#
#
# deploy:
# name: Deploy in DEV
# needs: [ image ]
# uses: ./.github/workflows/deploy_with_github_runner.yml
# with:
# environment: 'dev'
# branch: ${{ github.head_ref }}
# helm_options: '--set microservice-chart.fullnameOverride=pagopaselfcaremsbackofficebackend-${{ github.event.number }} --set microservice-chart.image.tag=${{ github.event.number }} --set microservice-chart.ingress.path="/selfcare/pagopa/${{ github.event.number }}/(.*)"'
# terraform_options: '-target=module.apim_api_backoffice_api_staging'
# suffix_name: '-${{ github.event.number }}'
# pr_number: ${{ github.event.number }}
# secrets: inherit
smoke_test:
name: Smoke Test
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
uses: ./.github/workflows/ci_integration_test.yml
with:
environment: 'local'
notify: false
secrets: inherit