Skip to content

Commit

Permalink
Merge pull request #26 from kieran-mackle/development
Browse files Browse the repository at this point in the history
Add coverage badge and test report
  • Loading branch information
kieran-mackle authored Jul 6, 2024
2 parents 647a760 + 8303c9e commit c87460a
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 7 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,32 @@ jobs:

- 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 tests
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
144 changes: 140 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,147 @@
# Pacakging
*egg-info/
# Configs
*.model

# IDE files
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
# htmlcov/
# coverage.svg
# pytest_report.html
.tox/
.nox/
.coverage
docs/build/
testing*
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDE
.vscode

# Miscellaneous
docs/build/
testing*
*.stl
*.csv
build/
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
<img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
</a>

<a>
<img src="https://github.com/kieran-mackle/hypervehicle/actions/workflows/tests.yml/badge.svg" alt="Test Status" class="center">
<a href="https://kieran-mackle.github.io/hypervehicle/pytest_report">
<img src="https://github.com/kieran-mackle/hypervehicle/actions/workflows/tests.yml/badge.svg" alt="Test Status" >
</a>

<a href="https://kieran-mackle.github.io/hypervehicle/coverage">
<img src="https://github.com/kieran-mackle/hypervehicle/raw/gh-pages/coverage.svg?raw=true" alt="Test Coverage" >
</a>

</p>
Expand Down

0 comments on commit c87460a

Please sign in to comment.