Skip to content

read the docs config v2 and github acitions for psycopg3 #12

read the docs config v2 and github acitions for psycopg3

read the docs config v2 and github acitions for psycopg3 #12

Workflow file for this run

# copied from django-cte
name: db_mutex tests
on:
push:
branches: [master]
pull_request:
branches: [master,develop]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ['3.7', '3.8', '3.9']
# Time to switch to pytest or nose2??
# nosetests is broken on 3.10
# AttributeError: module 'collections' has no attribute 'Callable'
# https://github.com/nose-devs/nose/issues/1099
django:
- 'Django~=3.2.0'
- 'Django~=4.0.0'
- 'Django~=4.1.0'
- 'Django~=4.2.0'
experimental: [false]
# include:
# - python: '3.9'
# django: 'https://github.com/django/django/archive/refs/heads/main.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
psycopg:
- 'psycopg2==2.9.6'
- 'psycopg==3.1.10'
exclude:
- python: '3.7'
django: 'Django~=4.0.0'
- python: '3.7'
django: 'Django~=4.1.0'
- python: '3.7'
django: 'Django~=4.2.0'
- psycopg: 'psycopg==3.1.10'
django: 'Django~=3.2.0'
- psycopg: 'psycopg==3.1.10'
django: 'Django~=4.0.0'
- psycopg: 'psycopg==3.1.10'
django: 'Django~=4.1.0'
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@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Setup
run: |
python --version
pip install --upgrade pip wheel setuptools
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-testing.txt
pip install "${{ matrix.django }}"
pip freeze
- name: Run tests
env:
DB_SETTINGS: >-
{
"ENGINE":"django.db.backends.postgresql",
"NAME":"db_mutex",
"USER":"postgres",
"PASSWORD":"postgres",
"HOST":"localhost",
"PORT":"5432"
}
run: |
coverage run manage.py test db_mutex
coverage report --fail-under=99
continue-on-error: ${{ matrix.experimental }}
- name: Check style
run: flake8 db_mutex