-
Notifications
You must be signed in to change notification settings - Fork 1
Add sonarqube action #1042
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
base: develop
Are you sure you want to change the base?
Add sonarqube action #1042
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build and analyze | ||
| runs-on: macos-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
| - uses: SonarSource/sonarqube-scan-action@v6 | ||
| env: | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
| # If you wish to fail your job when the Quality Gate is red, uncomment the | ||
| # following lines. This would typically be used to fail a deployment. | ||
| # We do not recommend to use this in a pull request. Prefer using pull request | ||
| # decoration instead. | ||
| # - uses: SonarSource/sonarqube-quality-gate-action@v1 | ||
| # timeout-minutes: 5 | ||
| # env: | ||
| # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # General settings | ||
| # sonar.host.url=https://sonarcloud.io | ||
| # sonar.organization=adyen | ||
| sonar.projectKey=platform-experience-components-web | ||
| sonar.sourceEncoding=UTF-8 | ||
|
|
||
| # Path to sources | ||
| sonar.sources=src | ||
| sonar.test.inclusions=**/*.test.* | ||
| sonar.exclusions=\ | ||
| mocks/**/*,\ | ||
| netlify/**/*,\ | ||
| src/types/**/*,\ | ||
| static/**/*,\ | ||
| stories/**/*,\ | ||
| tests/**/*,\ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| **/types.ts | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern
**/*.test.*is very broad and could match non-test files (e.g.,image.test.png). For a TypeScript project, it's better to be more specific with file extensions to ensure only actual test scripts are included.