ci: configure SonarQube

This commit is contained in:
Kirill Gavrilov 2025-01-21 23:37:35 +03:00
parent 8bae542a59
commit d60ddcc1c8
2 changed files with 26 additions and 0 deletions

View file

@ -32,3 +32,20 @@ jobs:
with:
name: lcov.info
path: out/coverage/lcov.info
SonarScan:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Download coverage data
uses: actions/download-artifact@v4
with:
name: lcov.info
path: coverage/
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

9
sonar-project.properties Normal file
View file

@ -0,0 +1,9 @@
sonar.projectKey=gavvvr_obsidian-timecodes-plugin
sonar.organization=gavvvr
sonar.sources=src
sonar.exclusions=**/*.test.ts
sonar.tests=src
sonar.test.inclusions=**/*.test.ts
sonar.javascript.lcov.reportPaths=./coverage/lcov.info