Skip to content

[MKT-255]: feat/add sonar properties #11

[MKT-255]: feat/add sonar properties

[MKT-255]: feat/add sonar properties #11

Workflow file for this run

name: SonarCloud code analysis
on:
push:
branches:
- master
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: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: yarn
- name: Test and coverage
run: yarn cypress
- name: Publish coverage results
uses: actions/upload-artifact@v2
with:
name: coverage
path: cypress/coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}