Hello,
I am not able to get sonarsource/sonarqube-scan-action@master
to read code coverage lcov.info
report.
It says
INFO: Analysing [/github/workspace/./__tests__/coverage/lcov.info]
WARN: Could not resolve 232 file paths in [/github/workspace/./__tests__/coverage/lcov.info]
Below is the workflow file & We are also checking in step “Debug lcov.info file” the lcov.info report content and it seems alright.
on:
workflow_dispatch:
push:
branches:
- Branchname
pull_request:
branches:
- Branchname
jobs:
sonarscan:
name: sonarscaning
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
yarn install
cd __tests__
yarn install
- name: Test and coverage
run: |
cd __tests__
yarn test
ls
- name: Test & coverage Report
run: |
cd __tests__
pwd
ls
cd coverage
pwd
ls
- name: Debug lcov.info file
run: |
cd __tests__/coverage
cat lcov.info
pwd
ls
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time.
# timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} ```
Below is what our sonar-project.properties file look like:
``
sonar.projectKey=XXXXXXXXXXXXXXXXXXXX
sonar.javascript.lcov.reportPaths=./__tests__/coverage/lcov.info
sonar.testExecutionReportPaths=./__tests__/test-report.xml
sonar.sources=.
sonar.sourceEncoding=UTF-8
sonar.test.inclusions=**/*.spec.js,**/*.spec.ts,__test__/**/*.spec.js,__test__/sapImageProxy/*.spec.js
Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
–Developer EditionVersion 10.4.1 - how is SonarQube deployed: zip