-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from vivid-planet/sonar-qube-actions
Invoke SonarQube via GitHub action
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: SonarCloud Code Analysis | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
push: | ||
branches: | ||
- main | ||
- next | ||
|
||
jobs: | ||
sonarqube: | ||
name: SonarQube | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: "https://registry.npmjs.org" | ||
cache: "yarn" # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies | ||
|
||
- run: yarn install | ||
|
||
- name: SonarQube Scan | ||
uses: SonarSource/sonarqube-scan-action@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sonar.projectKey=vivid-planet_dev-process-manager | ||
sonar.organization=vivid-planet | ||
sonar.sources=src/ | ||
sonar.tests=src/ | ||
sonar.test.inclusions=src/**/__tests__/**,src/**/*.spec.ts | ||
sonar.exclusions=src/**/__tests__/**,src/**/*.spec.ts | ||
sonar.cpd.exclusions=src/**/__tests__/**,src/**/*.spec.ts | ||
sonar.typescript.tsconfigPaths=tsconfig.json |