Skip to content

Pin dependencies

Pin dependencies #72

Workflow file for this run

name: Code Review
# Controls when the workflow will run
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
PROJECT_KEY: pagopa_pagopa-gps-donation-service
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
# 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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Set Node.js 16
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: 14.19.0
- name: Test
run: |
yarn install
yarn lint
yarn test
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
args: >
-Dsonar.organization=pagopa
-Dsonar.projectKey=${{env.PROJECT_KEY}}
-Dsonar.javascript.file.suffixes=.js,.jsx
-Dsonar.typescript.file.suffixes=.ts,.tsx
-Dsonar.sources=.
-Dsonar.exclusions=**/__tests__/**,**/__mocks__/**,**/*.js
-Dsonar.tests=**/__tests__
-Dsonar.test.inclusions=**/__tests__/**/*.test.tsx
-Dsonar.testExecutionReportPaths=test-report.xml
-Dsonar.sourceEncoding=UTF-8
-Dsonar.verbose=true
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.typescript.tsconfigPath=tsconfig.json
-Dsonar.eslint.reportPaths=eslint-report.json