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