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

Configure sonar-scanner #998

Merged
merged 2 commits into from
May 13, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/frontend_sonar_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
projectBaseDir: govtool/frontend
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_HOST_URL: https://sonarcloud.io

# Fail the build if it doesn't meet quality gate
# - uses: sonarsource/sonarqube-quality-gate-action@master
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,6 @@ scripts/govtool/dev-postgres_password
# nodejs/yarn

node_modules

# sonar scanner
.scannerwork/
8 changes: 7 additions & 1 deletion govtool/frontend/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
sonar.projectKey=voltaire-era_AYra4oOPzihwqYo-BApS
sonar.projectKey=intersect-govtool
sonar.sources=./src
sonar.host.url=https://sonarcloud.io
sonar.organization=intersect
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.junit.reportsPath=./junit-report.xml
sonar.exclusions=node_modules
9 changes: 7 additions & 2 deletions govtool/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const vitestConfig = defineVitestConfig({
setupFiles: "./src/setupTests.ts",
globals: true,
environment: "jsdom",
reporters: ["verbose", "junit"],
reporters: ["default","junit"],
outputFile: {
junit: './junit-report.xml',
json: './json-report.json',
},
coverage: {
include: [
"src/components/**/*",
Expand All @@ -62,7 +66,8 @@ const vitestConfig = defineVitestConfig({
"src/utils/**/*",
],
provider: "v8",
reporter: ["json-summary"],
reporter: ["json-summary","lcov"],
reportOnFailure: true,
enabled: true,
},
},
Expand Down
Loading