Skip to content

Feature/pep621

Feature/pep621 #167

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
branches: [ "develop" ]
tags-ignore: [ "**" ]
pull_request:
schedule:
- cron: "0 8 * * *"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip pre-commit black isort flake8
- name: Lint with flake8
run: |
pre-commit run --all
test:
services:
redis:
image: redis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "311", "312", "313" ]
django-version: [ "32", "42", "51" ]
env:
PY_VER: ${{ matrix.python-version}}
DJ_VER: ${{ matrix.django-version}}
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_ALWAYS_EAGER: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
- name: Install Python
if: matrix.python-version != '3.13'
run: uv python install --python-preference only-managed ${{ matrix.python-version}}
- name: Setup test suite ${{ env.DJ_VER }}-${{ env.PY_VER }}
run: tox run -vv --notest --skip-missing-interpreters false -e d${{ env.DJ_VER }}-py${{ env.PY_VER }}
- name: Run test suite
# COV_CMD=$(if [ ${{ env.DJ_VER }}-${{ env.PY_VER }} == 51-312 ]; then echo "--cov=pytest_echo --cov-report=xml"; else echo ; fi)
run: |
tox run --skip-pkg-install -e d${{ env.DJ_VER }}-py${{ env.PY_VER }}
env:
PYTEST_ADDOPTS: "-vv --durations=20"
DIFF_AGAINST: HEAD
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: ${{ success() && matrix.python-version == 3.13 }}
with:
env_vars: OS
name: codecov-pytest-order
token: ${{ secrets.CODECOV_TOKEN }}