Coverage for c04cb705a0dc38615e10f5eab5c94fe1b296293f #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
run-name: Coverage for ${{ github.sha }} | |
on: [push] | |
jobs: | |
coverage: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./UnitTests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Display Python version for testing purposes | |
run: python -c "import sys; print(sys.version)" | |
- name: Install Python dependencies | |
uses: py-actions/py-dependency-install@v4 | |
with: | |
path: "requirements.txt" | |
- name: Run unittests with pytest and coverage | |
run: python -m pytest --cov -v --cov-report=html | |
- name: Coverage Badge. | |
uses: tj-actions/coverage-badge-py@v2 | |
with: | |
working-directory: ./UnitTests | |
- name: Remove .gitignore from htmlcov | |
run: rm -f ./htmlcov/.gitignore | |
- name: Commit files | |
run: | | |
git pull | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Updated coverage.svg" | |
git push |