Coverage for ccf5aa9aa944ef324bb62e1a925344dece3977fc #287
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: . | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
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:UnitTests/htmlcov --cache-clear | |
- name: Coverage Badge. | |
uses: tj-actions/coverage-badge-py@v2 | |
- name: Remove .gitignore from htmlcov | |
run: rm -f ./UnitTests/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 |