diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de57a32..6cd79b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,12 @@ jobs: - name: Build Project run: yarn build - + + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + - name: Test and generate coverage report uses: artiomtr/jest-coverage-report-action@v2.3.0 with: @@ -45,11 +50,6 @@ jobs: skip-step: install test-script: yarn test custom-title: Jest Coverage Report - - - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # Commenting out SonarQube Quality Gate action for now # - uses: sonarsource/sonarqube-quality-gate-action@master diff --git a/sonar-project.properties b/sonar-project.properties index 9253996..4274da4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,29 +1,13 @@ # Project identification sonar.organization=wednesday-solutions sonar.projectKey=wednesday-solutions_next-bulletproof-ts_AY6yu6eKB2n8RRmGoUz4 - -# Specify the language -sonar.language=ts - # Source directory -sonar.sources=. - +sonar.sources=src # Test directory sonar.tests=src - -# Exclude node_modules -# Let's not exclude anything for now, after refractoring changes we can decide what to exclude from the analysis sonar.exclusions=node_modules/**/*,lighthouserc.js - sonar.test.inclusions=**/*.test.tsx,**/*.test.js,**/*.test.ts -sonar.javascript.lcov.reportPaths=./coverage/lcov.info -sonar.testExecutionReportPaths=./reports/test-report.xml - +sonar.javascript.lcov.reportPaths=coverage/lcov.info +sonar.testExecutionReportPaths=reports/test-report.xml # Encoding of the source code sonar.sourceEncoding=UTF-8 - -# Coverage report path -sonar.javascript.lcov.reportPaths=coverage/lcov.info - -# Test execution report path -sonar.testExecutionReportPaths=./reports/test-report.xml \ No newline at end of file