Skip to content

Commit eb3ff41

Browse files
authored
CI: Azure publish results (#6514)
1 parent 5d73fbb commit eb3ff41

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

azure-pipelines.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
displayName: 'Get legacy checkpoints'
7979
8080
- bash: |
81-
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50
81+
python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
8282
displayName: 'Testing: standard'
8383
8484
- bash: |
@@ -88,9 +88,27 @@ jobs:
8888
- bash: |
8989
python -m coverage report
9090
python -m coverage xml
91-
codecov --token=$(CODECOV_TOKEN) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
91+
python -m coverage html
92+
python -m codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
93+
ls -l
9294
displayName: 'Statistics'
9395
96+
- task: PublishTestResults@2
97+
displayName: 'Publish test results'
98+
inputs:
99+
testResultsFiles: '$(Build.StagingDirectory)/test-results.xml'
100+
testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
101+
condition: succeededOrFailed()
102+
103+
- task: PublishCodeCoverageResults@1
104+
displayName: 'Publish coverage report'
105+
inputs:
106+
codeCoverageTool: 'cobertura'
107+
summaryFileLocation: 'coverage.xml'
108+
reportDirectory: '$(Build.SourcesDirectory)/htmlcov'
109+
testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)'
110+
condition: succeededOrFailed()
111+
94112
- bash: |
95113
python -m pytest benchmarks -v --maxfail=2 --durations=0
96114
displayName: 'Testing: benchmarks'

0 commit comments

Comments
 (0)