Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move sonar reporting to GH action #576

Merged
merged 7 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
thornbill marked this conversation as resolved.
Show resolved Hide resolved
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