When I push my code to Github, SonarCloud analysis tells me that my coverage is not big enough. However the untested lines are precisely into my test files… How can I fix this?
I attach my conf files:
YML file
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16.17.0'
- name: Install
run: npm install
- name: Test
run: npm test
- name: Build
run: npm run build
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Quality SonarCloud
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Sonar properties
sonar.projectKey=guerin-jerome_front-gestinance
sonar.organization=guerin-jerome-1
sonar.javascript.lcov.reportPaths=./coverage/lcov.info