Skip to content

Commit 6b56e67

Browse files
committed
move coverage to azure [skip appveyor] [skip travis]
move coverage to azure [skip appveyor] move coverage to azure [skip appveyor] move coverage to azure [skip appveyor] move coverage to azure [skip appveyor]
1 parent 8a15a35 commit 6b56e67

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ matrix:
2727
- flake8
2828
- mypy .
2929
- pytest -r a -v
30-
after_success:
31-
- pytest --cov
32-
- coveralls
30+
# after_success:
31+
# - pytest --cov
32+
# - coveralls
3333

3434
install: pip install -e .[tests]
3535

azure-pipelines.yaml

+20-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pool:
1919
steps:
2020
- task: UsePythonVersion@0
2121
inputs:
22-
versionSpec: '$(python.version)'
22+
versionSpec: $(python.version)
2323

2424
- script: pip install -e .[tests,cov,github]
2525
displayName: Dev install
@@ -28,6 +28,23 @@ steps:
2828
- script: mypy .
2929
displayName: Type Check
3030
- script: pytest -r a -v
31+
condition: ne(variables['Agent.JobName'], 'Job linux_py37')
3132
displayName: Pytest
32-
- script: pytest --cov
33-
displayName: Coverage
33+
34+
- script: pytest --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
35+
condition: eq(variables['Agent.JobName'], 'Job linux_py37')
36+
displayName: PytestCoverage
37+
38+
- task: PublishTestResults@2
39+
condition: succeededOrFailed()
40+
inputs:
41+
testResultsFiles: '**/test-*.xml'
42+
testRunTitle: 'Publish test results for Python $(python.version)'
43+
44+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/python?view=azure-devops#publish-code-coverage-results
45+
- task: PublishCodeCoverageResults@1
46+
condition: and(succeeded(), eq(variables['Agent.JobName'], 'Job linux_py37'))
47+
inputs:
48+
codeCoverageTool: Cobertura
49+
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
50+
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ tests =
5555
pytest >= 3.9
5656
cov =
5757
pytest-cov
58-
coveralls
5958
flake8
6059
mypy
6160
github =

0 commit comments

Comments
 (0)