diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd7e71c..973b610 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,8 @@ name: CI on: pull_request: push: + branches: + - main jobs: lint: @@ -34,3 +36,6 @@ jobs: python-version: ${{ matrix.python-version }} - run: python -m pip install tox - run: tox -f py$(echo ${{ matrix.python-version }} | tr -d .) + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index a08d37b..b2ae8c5 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ Desktop.ini # Coverage htmlcov/ .coverage +coverage.xml diff --git a/README.md b/README.md index a3e9bb1..db5117b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # DRF Excel: Django REST Framework Excel Spreadsheet (xlsx) Renderer +[![codecov](https://codecov.io/gh/wharton/drf-excel/graph/badge.svg?token=EETTI9XRNO)](https://codecov.io/gh/wharton/drf-excel) + `drf-excel` provides an Excel spreadsheet (xlsx) renderer for Django REST Framework. It uses OpenPyXL to create the spreadsheet and provide the file to the end user. ## Requirements diff --git a/pyproject.toml b/pyproject.toml index 6370da3..726ab3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ build-backend = "setuptools.build_meta" write_to = "drf_excel/_version.py" [tool.pytest.ini_options] -addopts = "--cov --cov-report=html --cov-report=term" +addopts = "--cov --cov-report=xml --cov-report=term" python_files = "tests.py test_*.py" DJANGO_SETTINGS_MODULE = "tests.settings"