diff --git a/.github/workflows/test-eynollah.yml b/.github/workflows/test-eynollah.yml index 59503aa..1aff79a 100644 --- a/.github/workflows/test-eynollah.yml +++ b/.github/workflows/test-eynollah.yml @@ -47,7 +47,25 @@ jobs: make install EXTRAS=OCR,plotting make deps-test - name: Test with pytest - run: make test + run: make coverage PYTEST_ARGS="--junitxml=pytest.xml" + - name: Get coverage results + run: | + coverage report --format=markdown >> $GITHUB_STEP_SUMMARY + coverage html json xml + - name: Store coverage results + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: | + htmlcov + pytest.xml + coverage.xml + coverage.json + - name: Upload coverage results + uses: codecov/codecov-action@v4 + with: + files: coverage.xml + fail_ci_if_error: false - name: Test standalone CLI run: make smoke-test - name: Test OCR-D CLI diff --git a/Makefile b/Makefile index d910596..5f2bf34 100644 --- a/Makefile +++ b/Makefile @@ -113,8 +113,7 @@ test: coverage: coverage erase $(MAKE) test PYTHON="coverage run" - coverage report - coverage html + coverage report -m # Build docker image docker: diff --git a/README.md b/README.md index 4d430bc..16ac661 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![PyPI Version](https://img.shields.io/pypi/v/eynollah)](https://pypi.org/project/eynollah/) [![GH Actions Test](https://github.com/qurator-spk/eynollah/actions/workflows/test-eynollah.yml/badge.svg)](https://github.com/qurator-spk/eynollah/actions/workflows/test-eynollah.yml) +[![GH Actions Deploy](https://github.com/qurator-spk/eynollah/actions/workflows/build-docker.yml/badge.svg)](https://github.com/qurator-spk/eynollah/actions/workflows/build-docker.yml) [![License: ASL](https://img.shields.io/github/license/qurator-spk/eynollah)](https://opensource.org/license/apache-2-0/) [![DOI](https://img.shields.io/badge/DOI-10.1145%2F3604951.3605513-red)](https://doi.org/10.1145/3604951.3605513) diff --git a/requirements-test.txt b/requirements-test.txt index 718f480..cce9428 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ pytest pytest-subtests -coverage +coverage[toml] black