🚧 Changed pytest report type to XML + coverage file taken into account (test)
continuous-integration/drone/push Build is failing Details

master
Alix JEUDI--LEMOINE 4 months ago
parent ddd6eda64f
commit 4100d87603

@ -47,7 +47,10 @@ steps:
from_secret: SECRET_MONGODB_PASSWORD from_secret: SECRET_MONGODB_PASSWORD
MONGODB_DATABASE: memorymap_tests MONGODB_DATABASE: memorymap_tests
commands: commands:
- /opt/sonar-scanner/bin/sonar-scanner -Dsonar.login=$PLUGIN_SONAR_TOKEN -Dsonar.projectKey=SAE3A_MemoryMap-api -Dsonar.coverage.exclusions="tests/**" -Dsonar.python.version=3 # Add -Dsonar.coverageReportPaths="coveragereport/SonarQube.xml" later - pip install -r tests/requirements.txt
- pytest
- reportgenerator -reports:"coverage.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- /opt/sonar-scanner/bin/sonar-scanner -Dsonar.login=$PLUGIN_SONAR_TOKEN -Dsonar.projectKey=SAE3A_MemoryMap-api -Dsonar.coverage.exclusions="tests/**" -Dsonar.python.version=3 -Dsonar.coverageReportPaths="coveragereport/SonarQube.xml"
settings: settings:
sonar_token: sonar_token:
from_secret: SECRET_SONAR_TOKEN from_secret: SECRET_SONAR_TOKEN

@ -1,3 +1,3 @@
[pytest] [pytest]
addopts = --cov=app --cov-report=term-missing addopts = --cov=app --cov-report=term-missing --cov-report=xml
testpaths = tests testpaths = tests
Loading…
Cancel
Save