diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b70d2ac..49d6bcf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,3 +26,15 @@ jobs: - run: npm run lint - run: npm run units - run: npm run integration + + sonarqube-analysis: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..999ba27 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,11 @@ +sonar.projectKey=boilerplate-express +sonar.projectName=express-boilerplate +sonar.organization=thesoftwarehouse +sonar.host.url=${env.SONAR_HOST_URL} +sonar.token=${env.SONAR_TOKEN} +sonar.exclusions=src/migrations/** +sonar.sources=src +sonar.tests=src +sonar.test.inclusions=**/*.spec.ts +sonar.sourceEncoding=UTF-8 +sonar.javascript.lcov.reportPaths=coverage/unit/lcov.info,coverage/integration/lcov.info \ No newline at end of file