Code coverage is coming out to be 0.0% on sonarCloud even when it is 100% on bitbucket

sonar.projectKey=pythonworkspacefatima_pythonrepo
sonar.organization=pythonworkspacefatima
sonar.sources=.
sonar.exclusions=**/node_modules/**,**/venv/**,**/__pycache__/**
sonar.python.coveragePlugin=python
sonar.python.coverage.reportPaths=coverage-reports/coverage.xml
 image: python:3.8
pipelines:
  default:
    - parallel:
        - step:
            name: Install dependencies
            caches:
              - pip
            script:
              - >-
                if [ -f requirements.txt ]; then pip install -r
                requirements.txt; fi
        - step:
            name: Build, test, and analyze on SonarCloud
            caches:
              - pip
              
            script:
              - pip install pytest pytest-cov pandas coverage
              - pip install --upgrade pip
              - export PYTHONPATH=$PYTHONPATH:Source_files/
              - cp -r Raw_data Source_files/
              - coverage run --source=Source_files -m pytest Test_files/
              - coverage report
              - coverage xml -o coverage-reports/coverage.xml
              - echo "Contents of coverage-reports/ directory:"
              - ls -l coverage-reports/
              - echo "Contents of coverage.xml file:"
              - cat coverage-reports/coverage.xml
        - step:
            name: SonarCloud Analysis
            caches:
              - pip
            script:
              - pipe: sonarsource/sonarcloud-scan:1.1.0
                variables:
                  SONAR_TOKEN: $SONAR_TOKEN
                  EXTRA_ARGS: >-
                    -Dsonar.python.coverage.reportPaths=coverage-reports/coverage.xml
            artifacts:
              - coverage-reports/coverage.xml

everything is correct but the issue still exist

Hi,

Welcome to the community!

Can you share your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann