-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions: Setup SonarCloud for coverage reports
GitHub Actions: Don't use external dependency for SonarCloud GitHub Actions: Fixes SonarCloud not installing dependencies
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Sonarcloud | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
|
||
jobs: | ||
SonarCloud: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Run Tests | ||
run: npm ci && npm run test | ||
|
||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sonar.projectKey=Mc-Auth-com_Mc-Auth | ||
sonar.organization=mc-auth-com | ||
|
||
sonar.language=ts | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
sonar.sources=./src/ | ||
sonar.tests=./tests/ | ||
|
||
sonar.javascript.lcov.reportPaths=./coverage/lcov.info |