Skip to content

Commit 46561bb

Browse files
author
Gonzalo Diaz
committed
[CONFIG] Node script for github-actions, sonarcloud automatic scan disabled (to enable coverage support):
https://docs.sonarsource.com/sonarcloud/enriching/test-coverage/javascript-typescript-test-coverage/
1 parent 9417806 commit 46561bb

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/node-coverage.js.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ jobs:
4343
with:
4444
token: ${{ secrets.CODECOV_TOKEN }} # required
4545
verbose: true # optional (default = false)
46+
47+
- name: SonarCloud Scan
48+
uses: SonarSource/sonarcloud-github-action@master
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
51+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
sonar.projectKey=sir-gon_algorithm-exercises-js
2+
sonar.organization=sir-gon
3+
4+
# This is the name and version displayed in the SonarCloud UI.
5+
#sonar.projectName=algorithm-exercises-ts
6+
#sonar.projectVersion=1.0
7+
8+
9+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
10+
sonar.sources=src
11+
sonar.exclusions=**/*.json,**/*.test.js,**/*.bruteforce-test.js,src/logger.js
12+
13+
# Encoding of the source code. Default is default system encoding
14+
sonar.sourceEncoding=UTF-8
15+
16+
# Coverage
17+
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

0 commit comments

Comments
 (0)