feature: add test coverage

Example: https://github.com/joaomper-TE/thousandeyes-sdk-python/pull/25
This commit is contained in:
João Malés 2024-09-27 13:43:29 +01:00 committed by GitHub
parent e76d1fb0d4
commit 6350b6f9f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,17 @@ jobs:
- name: Install and test modules
run: |
pip install pytest
pip install coverage
for module in $(find . -maxdepth 1 -type d -name "thousandeyes-sdk-*" ! -name "thousandeyes-sdk-core" | cut -c 3-); do
pip install -e $module
pytest $module
coverage run -m pytest $module
done
coverage xml
- name: Get Cover
uses: orgoro/coverage@v3.2
with:
coverageFile: ./coverage.xml
thresholdAll: 0.4
thresholdNew: 0.6
token: ${{ secrets.GITHUB_TOKEN }}