Skip to content

Commit c14e2c1

Browse files
TomNicholaskeewis
andauthored
Add code coverage to CI (#16)
* test file to trigger CI * try to trigger codecov * Upload test coverage data * yaml syntax * bash to script * Install and use pytest-cov plugin * Remove test file Co-authored-by: Keewis <[email protected]>
1 parent 4f3b0bc commit c14e2c1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

azure-pipelines.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ jobs:
3131
displayName: 'Install dependencies'
3232
3333
- script: |
34-
pip install pytest pytest-azurepipelines
35-
pytest --verbose
34+
pip install pytest pytest-azurepipelines pytest-cov
35+
pytest --verbose --cov=./ --cov-report=xml
3636
displayName: 'pytest'
3737
38+
- script: |
39+
curl https://codecov.io/bash > codecov.sh
40+
bash codecov.sh -t aba016f6-96be-4bc3-bdbe-caa6b6aff815
41+
displayName: 'Upload coverage to codecov.io'
42+
3843
- job: LintFlake8
3944
pool:
4045
vmImage: 'ubuntu-16.04'

0 commit comments

Comments
 (0)