Skip to content

Commit

Permalink
Configure sonar-scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed May 13, 2024
1 parent 6e09ecf commit d57c6d2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
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

0 comments on commit d57c6d2

Please sign in to comment.