-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (29 loc) · 1.18 KB
/
sonarcloud-js.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
name: sonarcloud-js
env:
SQ_EXCLUSIONS: "**/platform/alias-service.js,**/docs/**,**/node_modules/**,**/examples/**,**/artifacts/**,**/ci/**,Jenkinsfile,**/LICENSE,**/*.css,**/*.md,**/*.json,**/tests/**,**/stories/*.js,**/test/**,**/.stories.js,**/resources/bigtest/interactors/**,**/resources/bigtest/network/**,**/*-test.js,**/*.test.js,**/*-spec.js,**/karma.conf.js,**/jest.config.js"
SQ_ROOT_DIR: ./src
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud-js:
name: SonarCloudJS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run SonarCloud scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=indexdata
-Dsonar.projectKey=indexdata_${{ github.event.repository.name }}
-Dsonar.projectName=${{ github.event.repository.name }}
-Dsonar.sources=${{ env.SQ_ROOT_DIR }}
-Dsonar.language=js
-Dsonar.exclusions=${{ env.SQ_EXCLUSIONS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}