diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d232096..f5f9c5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,16 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Run test coverage + run: | + ./tasks _test_coverage + - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: diff --git a/sonar-project.properties b/sonar-project.properties index 86d896b..3296812 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,12 +2,16 @@ sonar.projectKey=prm-orphaned-record-continuity_prm-repo-gp2gp-messenger sonar.organization=prm-orphaned-record-continuity # This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=prm-repo-gp2gp-messenger -#sonar.projectVersion=1.0 +sonar.projectName="GP2GP Messenger" +sonar.projectVersion=1.0 +sonar.javascript.lcov.reportPaths=coverage/lcov.info # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -#sonar.sources=. +sonar.sources=src/ +sonar.exclusions=src/**/__test__/**/* +sonar.tests=src/,test/ +sonar.test.inclusions=src/**/__tests__/*,src/**/__mocks__/*,src/**/__builders__/*,src/**/*.test.js # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8 \ No newline at end of file