Skip to content

Commit

Permalink
Merge pull request #613 from systemli/Configure-SonarCloud
Browse files Browse the repository at this point in the history
👷 Configure SonarCloud
  • Loading branch information
0x46616c6b authored Apr 26, 2024
2 parents 6ae5d2f + ab91170 commit b8e7b65
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:
- name: Test
run: yarn run coverage

- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build:
name: Build
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ticker-admin [![Integration](https://github.com/systemli/ticker-admin/actions/workflows/integration.yml/badge.svg)](https://github.com/systemli/ticker-admin/actions/workflows/integration.yml)
# ticker-admin

[![Integration](https://github.com/systemli/ticker-admin/actions/workflows/integration.yml/badge.svg)](https://github.com/systemli/ticker-admin/actions/workflows/integration.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=systemli_ticker-admin&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=systemli_ticker-admin) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=systemli_ticker-admin&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=systemli_ticker-admin) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=systemli_ticker-admin&metric=coverage)](https://sonarcloud.io/summary/new_code?id=systemli_ticker-admin)

## Development

Expand Down
9 changes: 9 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sonar.projectKey=systemli_ticker-admin
sonar.organization=systemli

sonar.sources=src/
sonar.exclusions=src/__mocks__/**

sonar.test.inclusions=**/*.test.tsx,**/*.test.ts

sonar.javascript.lcov.reportPaths=coverage/lcov.info
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ export default defineConfig({
environment: 'jsdom',
setupFiles: './vitest-setup.ts',
css: false,
coverage: {
provider: 'v8',
reporter: ['lcov'],
},
},
})

0 comments on commit b8e7b65

Please sign in to comment.