diff --git a/.github/workflows/sonarcloud-frontend.yml b/.github/workflows/sonarcloud-frontend.yml index 1bfc2b9..a48f70c 100644 --- a/.github/workflows/sonarcloud-frontend.yml +++ b/.github/workflows/sonarcloud-frontend.yml @@ -11,6 +11,12 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Install dependencies + working-directory: ./frontend + run: npm install + - name: Test with coverage + working-directory: ./frontend + run: npx jest --coverage - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: diff --git a/sonar-project.properties b/sonar-project.properties index bf20d84..73c63b7 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -10,4 +10,6 @@ sonar.organization=neuefische sonar.sources=./frontend/src # Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8 \ No newline at end of file +#sonar.sourceEncoding=UTF-8 + +sonar.javascript.lcov.reportPaths=./frontend/coverage/lcov.info \ No newline at end of file