Avoid recursion when a model instance has multiple deferred audit fields #139
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ['3.9', '3.10', '3.11', '3.12'] | |
django: ['django==3.2.*', 'django==4.2.*'] | |
experimental: [false] | |
include: | |
- python: '3.10' | |
django: 'https://github.com/django/django/archive/refs/heads/stable/5.0.x.zip#egg=Django' | |
experimental: true | |
# NOTE this job will appear to pass even when it fails because of | |
# `continue-on-error: true`. Github Actions apparently does not | |
# have this feature, similar to Travis' allow-failure, yet. | |
# https://github.com/actions/toolkit/issues/399 | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Setup | |
run: | | |
python --version | |
pip install --upgrade pip wheel | |
pip install "${{ matrix.django }}" psycopg2-binary pynose flake8 coverage | |
- name: Run tests | |
env: | |
DB_SETTINGS: >- | |
{ | |
"ENGINE":"django.db.backends.postgresql_psycopg2", | |
"NAME":"field_audit", | |
"USER":"postgres", | |
"PASSWORD":"postgres", | |
"HOST":"localhost", | |
"PORT":"5432" | |
} | |
run: nosetests -v --with-coverage --cover-branches --cover-package=field_audit | |
continue-on-error: ${{ matrix.experimental }} | |
- name: Check migrations | |
run: | | |
./example/manage.py makemigrations field_audit | |
git add ./field_audit/migrations | |
trap 'git reset --hard HEAD' EXIT # discard changes on exit (needed for continue-on-error) | |
git diff --cached --exit-code | |
continue-on-error: ${{ matrix.experimental }} | |
- name: Check style | |
run: flake8 --config=setup.cfg |