Unit tests are not showing up

I am trying to run sonarqube scan in github actions using pytest but not getting unit test count.
here is the github actions code and sonar-project.properties

      - name: Run tests
        timeout-minutes: 20
        run: |
          cp .env.example .env
          pytest -n auto --cov=./ --cov-report=xml --cov-report=term --junitxml=report.xml

      - name: SonarQube Scan
        uses: sonarsource/sonarqube-scan-action@master
        env:
          SONAR_TOKEN: ${{ secrets.TOKEN }}
          SONAR_HOST_URL: ${{ secrets.HOST_URL }}

sonar-project.properties.

sonar.projectKey=some_project_key
sonar.python.version=3.9
sonar.terraform.provider.aws.version=4.20.1
sonar.python.coverage.reportPaths=/github/workspace/coverage.xml

# Define the same root directory for sources and tests
sonar.sources=.
sonar.tests=.

# Include test subdirectories in test scope
sonar.test.inclusions=tests/

# Exclude test subdirectories from source scope
sonar.exclusions =tests/

#Include test execution report
sonar.python.xunit.reportPath=/github/workspace/report.xml
sonar.python.xunit.skipDetails=true

but not getting the unit tests count on the dashboard

here are some logs from github actions

INFO: Python test coverage
INFO: Parsing report '/github/workspace/coverage.xml'
WARN: Invalid directory path in 'source' element: /home/runner/work/backend/backend
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=200ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=39ms

I am using github actions to scan source code but not getting the unit test count .

here are the code snippets of GitHub actions and sonar-project.properties and logs…

Github actions

      - name: Run tests
        timeout-minutes: 20
        run: |
          cp .env.example .env
          pytest -n auto --cov=./ --cov-report=xml --cov-report=term --junitxml=report.xml

      - name: SonarQube Scan
        uses: sonarsource/sonarqube-scan-action@master
        env:
          SONAR_TOKEN: ${{ secrets.token }}
          SONAR_HOST_URL: ${{ secrets.host_url }}

sonar-project.properties

sonar.projectKey=dummy_project_key
sonar.python.version=3.9
sonar.terraform.provider.aws.version=4.20.1
sonar.python.coverage.reportPaths=/github/workspace/coverage.xml

# Define the same root directory for sources and tests
sonar.sources=.
sonar.tests=.

# Include test subdirectories in test scope
sonar.test.inclusions=tests/

# Exclude test subdirectories from source scope
sonar.exclusions =tests/

#Include test execution report
sonar.python.xunit.reportPath=/github/workspace/report.xml
sonar.python.xunit.skipDetails=true

github actions logs

INFO: Python test coverage
INFO: Parsing report '/github/workspace/coverage.xml'
WARN: Invalid directory path in 'source' element: /home/runner/work/backend/backend
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=200ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=39ms

Hey there.

Do you receive any additional details when analyzing in debug mode?

Try adding:

  with:
    args: >
      -Dsonar.verbose=true

under your env block