Skip to content

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

[MKT-255]: feat/add sonar properties

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

Workflow file for this run

name: SonarCloud code analysis
on:
push:
branches: ['main']
pull_request:
branches: ['main']
permissions:
pull-requests: read
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
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@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: echo '${{ secrets.CYPRESS_ENV }}' > cypress.env.json
- run: echo '${{ secrets.ENV_LOCAL }}' > .env.local
- name: Test and coverage
uses: cypress-io/github-action@v6
with:
install: yarn install
build: yarn build
start: yarn start
browser: chrome
- name: Analyze with SonarCloud
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}