Skip to content

updates CI

updates CI #199

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:
django: [ "5.1", "4.2", "3.2" ]
python: [ "3.13", "3.12", "3.11", "3.10" ]
env:
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:
version: "latest"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
cache-suffix: ${{ matrix.python }}-${{ matrix.django }}
github-token: ${{ secrets.GITHUB_TOKEN }}
python-version: ${{ matrix.python }}
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh-actions
- name: Install Python
if: matrix.python != '3.13'
run: uv python install --python-preference only-managed ${{ matrix.python }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false --workdir .tox
- name: Run test suite ${{ matrix.django }}-${{ matrix.python }}
run: tox run --skip-pkg-install --workdir .tox
env:
PYTEST_ADDOPTS: "-vv --durations=20"
DIFF_AGAINST: HEAD
DJANGO: ${{ matrix.django }}
- name: Upload coverage to Codecov
uses: codecov/test-results-action@v1
if: ${{ success() && matrix.python == '3.13' && matrix.django == '5.1' }}
with:
directory: .tox
env_vars: OS
flags: unittests
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true