Codecov_fixes (#562)

* Trying to get codecov working again

* Use poetry run

* Defining testing extras

* Fixing codecov output files

* Try installing the right Django version and show relevant upload tags

* Cover only project files
This commit is contained in:
Ilan Steemers
2021-05-23 17:37:22 +02:00
committed by GitHub
parent 71d4b726ea
commit 981ba0c80c
4 changed files with 478 additions and 78 deletions

View File

@@ -33,7 +33,6 @@ jobs:
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- uses: codecov/codecov-action@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
@@ -41,14 +40,21 @@ jobs:
- name: Install dependencies with Django ${{ matrix.django }}
run: |
python -m pip install --upgrade pip
pip install -q django==${{ matrix.django }}
pip install -r requirements.txt
pip install pytest --upgrade
pip install pytest-django codecov sphinx poetry
poetry install
pip install poetry
poetry add "django==${{ matrix.django }}"
poetry install -E testing
- name: Run Tests
run: |
coverage run --source=django_q -m py.test
poetry run pytest --cov=./django_q --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v1
env:
PYTHON: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: PYTHON, DJANGO
fail_ci_if_error: true
- name: Build docs
run: |
sphinx-build -b html -d docs/_build/doctrees -nW docs docs/_build/html
poetry run sphinx-build -b html -d docs/_build/doctrees -nW docs docs/_build/html