#2084: debug coverage file

This commit is contained in:
Czar Echavez
2023-12-02 01:19:38 +00:00
parent 31c4287f46
commit 6ecb47f5ae

View File

@@ -104,7 +104,7 @@ stages:
version: '2.1.x'
- script: |
pytest -v tests/ --cov=src/ -o junit_family=xunit2 --junitxml=junit/test-results.xml --cov-report xml:$(System.DefaultWorkingDirectory)/coverage.xml --cov-report html:$(System.DefaultWorkingDirectory)/htmlcov --cov-report term
pytest -v --cov=src/ -o junit_family=xunit2 --junitxml=junit/test-results.xml --cov-report xml:$(System.DefaultWorkingDirectory)/coverage.xml --cov-report html:$(System.DefaultWorkingDirectory)/htmlcov --cov-report term
displayName: 'Run tests and code coverage'
- task: PublishTestResults@2
@@ -124,18 +124,18 @@ stages:
# summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
# failIfCoverageEmpty: true
- task: PublishCodeCoverageResults@2
displayName: 'Install code coverage upload dependencies'
# We only want the dependencies - this azure task is borked https://github.com/microsoft/azure-pipelines-tasks/issues/17756
# ref: https://github.com/microsoft/azure-pipelines-tasks/issues/17756#issuecomment-1585620675
condition: eq('true', 'false') # THIS WILL NEVER RUN ONCE TASK DECLARATION IS NEEDED TO DOWNLOAD IT SOURCES
inputs:
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
# - task: PublishCodeCoverageResults@2
# displayName: 'Install code coverage upload dependencies'
# # We only want the dependencies - this azure task is borked https://github.com/microsoft/azure-pipelines-tasks/issues/17756
# # ref: https://github.com/microsoft/azure-pipelines-tasks/issues/17756#issuecomment-1585620675
# condition: eq('true', 'false') # THIS WILL NEVER RUN ONCE TASK DECLARATION IS NEEDED TO DOWNLOAD IT SOURCES
# inputs:
# summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
- task: CmdLine@2
displayName: Publish Code Coverage
env: { 'SYSTEM_ACCESSTOKEN': $(System.AccessToken) } #access token is needed to upload report to azure pipeline tabs
inputs:
script: |
mkdir /home/vsts/work/_temp/cobertura
"$(Dotnet_Root)/dotnet"dotnet `find /home/vsts/work/_tasks/ -name CoveragePublisher.Console.dll` '$(System.DefaultWorkingDirectory)/coverage.xml' --reportDirectory /home/vsts/work/_temp/cobertura
# - task: CmdLine@2
# displayName: Publish Code Coverage
# env: { 'SYSTEM_ACCESSTOKEN': $(System.AccessToken) } #access token is needed to upload report to azure pipeline tabs
# inputs:
# script: |
# mkdir /home/vsts/work/_temp/cobertura
# "$(Dotnet_Root)/dotnet" `find /home/vsts/work/_tasks/ -name CoveragePublisher.Console.dll` '$(System.DefaultWorkingDirectory)/coverage.xml' --reportDirectory /home/vsts/work/_temp/cobertura