Skip to content

initial script for jest to sonar #1

initial script for jest to sonar

initial script for jest to sonar #1

name: SonarCloud Scan
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.javascript.lcov.reportPaths= ${{github.workspace}}/coverage/lcov.info
-Dsonar.testExecutionReportPaths= ${{github.workspace}}/test-report.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}