SonarCloud cannot read coverage informations - SonarCloud with GitHub Actions

Hi guys.
My team and I are using SonarCloud with GitHub Actions and so far everything has been working fine. However, we are now facing an issue where the sonar is not reading coverage information.

There were no changes in the workflow, but it started to happen. Locally we can see coverage by HTML report and it is working as expected.

Here is our workflow code:

name: Test push
on: push
    runs-on: ubuntu-latest

        node-version: [10.x]
        mongodb-version: [4.0]

      - uses: actions/checkout@v2
          # Disabling shallow clone is recommended for improving relevancy of reporting
          fetch-depth: 0

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
          node-version: ${{ matrix.node-version }}

      - name: Start MongoDB
        uses: supercharge/mongodb-github-action@1.3.0
          mongodb-version: ${{ matrix.mongodb-version }}

      - name: Install packages
        run: npm ci

      - name: Build typescript
        run: npm run build

      - name: Test
        run: npm run test:coverage

      - name: SonarCloud Scan
        uses: sonarsource/sonarcloud-github-action@master
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          projectBaseDir: "/home/runner/work/estudaqui-cloudcode/estudaqui-cloudcode/"
          args: >

      - name: Dispatch deploy production
        if: ${{ github.ref == 'refs/heads/master' }}
        uses: peter-evans/repository-dispatch@v1
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          repository: ${{ github.repository }}
          event-type: deploy-production
          client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

The npm run test: coverage executes the command nyc --reporter = lcov npm run test and put informations in coverage/

Thanks for any help!

Hi @geeksilva97 as you can see in our documentation about test coverage, the correct parameter name should be sonar.javascript.lcov.reportPaths . The property name you used was considered deprecated, and recently dropped, on August 16th.

If you could replace it with the correct parameter, your coverage information should come back. Please let us know if you need anything else.

Best regards,

Thanks for helping. I’ll replace the param and test.