diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index af264f8a..5b8abfa3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,4 +78,9 @@ jobs: # run: poetry run mypy - name: Run pytest - run: poetry run pytest -v + run: poetry run pytest --cov=openeo_processes_dask --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./coverage.xml diff --git a/README.md b/README.md index 1927f182..6a30d73d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # OpenEO Processes Dask +[![codecov](https://codecov.io/github/Open-EO/openeo-processes-dask/branch/main/graph/badge.svg?token=RA82MUN9RZ)](https://codecov.io/github/Open-EO/openeo-processes-dask) + ## Development environment openeo-processes-dask requires poetry >1.2, see their [docs](https://python-poetry.org/docs/#installation) for installation instructions. @@ -25,5 +27,6 @@ poetry run python -m pytest Note that you can also use the virtual environment that's generated by poetry as the kernel for the ipynb notebooks. -Pre-commit hooks +**Pre-commit hooks** + This repo makes use of [pre-commit](https://pre-commit.com/) hooks to enforce linting & a few sanity checks. In a fresh development setup, install the hooks using `poetry run pre-commit install`. These will then automatically be checked against your changes before making the commit. diff --git a/pyproject.toml b/pyproject.toml index 75cc840c..7419a32e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,6 @@ packages = [ { include = "openeo_processes_dask" } ] - [tool.poetry.dependencies] python = ">=3.9,<3.10" geopandas = "^0.12.1" @@ -46,6 +45,12 @@ mapclassify = "^2.4.3" [tool.poetry.group.dev.dependencies] bokeh = "<3" pre-commit = "^2.20.0" +pytest-cov = "^4.0.0" + +[tool.pytest.ini_options] +testpaths = [ + "tests", +] [build-system] requires = ["poetry-core>=1.0.0"]