SonarCloud can’t find .lcov file in Github Action

I am using the sonarqube-scan-action action in a Github Action, following the documentation, to analysize a typescript project, which has Jest.
My action has this block:


- name: Tests
  run: npm run test:coverage
- uses: sonarsource/sonarqube-scan-action@master
  env:
    SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

In the sonar-project.properties file from my project, there is the configuration proposed by the documentation, too, to define the file path:

sonar.javascript.lcov.reportPaths=coverage/lcov.info

When the action runs, it cannot find the .lcov file:


INFO: Analysing [/github/workspace/coverage/lcov.info]
WARN: Could not resolve 1 file paths in [/github/workspace/coverage/lcov.info]

Looking at the logs from the action, the step that generates the coverage outputs this:


info - 2024-09-22 17:36:23,071 -- > /home/runner/work/front-mfe-***/front-mfe-***/coverage/lcov.info

It seems that each action runs in different folders.
I cannot find a way to fix it, I have already searched but didn’t find a solution on the official docs.
Am I missing something?

Tried to change the configuration in the action and in the .properties file but didn’t work out.