-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.21 KB
/
sonar.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: SonarQube analysis
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
- master
- staging
- qa
- development
env:
SONAR_PROJECT: myapp-delete
jobs:
sonar:
runs-on: ubuntu-latest
steps:
- name: 📦 Checkout project repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 📦 Setup Node + PNPM + install deps
uses: ./.github/actions/setup-node-pnpm-install
- name: Run Tests
run: export NODE_OPTIONS=--experimental-vm-modules && pnpm test:ci
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_URL }}
with:
args: >
-Dsonar.sonar.sources=./src
-Dsonar.qualitygate.wait=true
-Dsonar.projectBaseDir=.
-Dsonar.verbose=false
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT }}
-Dsonar.sonar.sourceEncoding=UTF-8
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.coverage.exclusions=**/storage/**,**/**.config.js,**/*.test.tsx,**/icons/**