diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 957e37c..c80eda5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,14 +18,26 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: python-version: 3.9 + - name: Install package run: | pip install .[test] + - name: Test with pytest run: | cd tests - pytest --headless . + pytest --headless --cov=lsqfitgui --cov-report=xml + + - name: Upload tests to Codecov + uses: codecov/codecov-action@v2 + with: + file: ./tests/coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: true diff --git a/README.md b/README.md index cd1ef85..842d245 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ [![Documentation Status](https://readthedocs.org/projects/lsqfitgui/badge/?version=latest)](https://lsqfitgui.readthedocs.io/en/latest/?badge=latest) +[![Code Coverage](https://codecov.io/gh/ckoerber/lsqfit-gui/branch/master/graph/badge.svg)](https://codecov.io/gh/ckoerber/lsqfit-gui) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) + # Lsqfit GUI Graphical user interface for `lsqfit` using `dash`. diff --git a/requirements-dev.txt b/requirements-dev.txt index 87dedf0..49fface 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,3 +6,4 @@ black sphinx pydata-sphinx-theme myst-parser +pytest-cov diff --git a/setup.cfg b/setup.cfg index 72be519..e180b42 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,6 +40,17 @@ exclude = test = dash[testing] pytest + pytest-cov +dev = + numpy + scipy + dash[testing] + pytest + black + sphinx + pydata-sphinx-theme + myst-parser + pytest-cov [options.package_data]