24 increase test coverage #55
Workflow file for this run
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: tests | |
on: | |
push: | |
branches: [ master, development ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install packages | |
run: | | |
git config --global url."https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github".insteadOf https://github | |
python -m pip install --upgrade pip | |
pip install coverage-badge | |
pip install pytest | |
pip install pytest-cov | |
pip install pytest-html | |
pip install ./ | |
- name: Test with pytest | |
run: | | |
pytest --cov=hypervehicle --cov-report xml --cov-report html --html=pytest_report.html --self-contained-html tests/ | |
- name: Generate coverage badge | |
run: | | |
coverage-badge -f -o coverage.svg | |
- name: Clean up and organise | |
run: | | |
mkdir coverage | |
mv htmlcov/* coverage/ | |
mkdir deploy | |
mv coverage deploy/ | |
mv coverage.svg deploy/ | |
mv pytest_report.html deploy/ | |
- name: Publish to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: deploy |