Skip to content

Commit

Permalink
Merge pull request #576 from jellyfin/sonar-gh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
thornbill authored Oct 14, 2023
2 parents 8209bcf + cbc9b88 commit b7fd1c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,13 @@ jobs:
- name: Run jest
run: npx jest --coverage --group=unit

- name: SonarCloud scan
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }}
uses: SonarSource/sonarcloud-github-action@c25d2e7e3def96d0d1781000d3c429da22cd6252 # v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Upload coverage
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }}
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ openapi-templates
codecov.yml
jest.config.cjs
rollup.config.js
sonar-project.properties
.sonarcloud.properties
tsconfig.json
6 changes: 6 additions & 0 deletions .sonarcloud.properties → sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
sonar.projectKey=jellyfin_jellyfin-sdk-typescript
sonar.organization=jellyfin

# Paths for sources
sonar.sources = src/
sonar.exclusions = src/**/__tests__/**/*,src/**/__helpers__/**/*,src/generated-client/**/*

# Paths for tests
sonar.tests = src/
sonar.test.inclusions = src/**/__tests__/**/*

# Coverage report paths
sonar.javascript.lcov.reportPaths = coverage/lcov.info

0 comments on commit b7fd1c7

Please sign in to comment.