Skip to content

Commit

Permalink
Use frozen constraints in tox so it picks up the correct Django/Wagta…
Browse files Browse the repository at this point in the history
…il version
  • Loading branch information
zerolab committed Feb 10, 2024
1 parent 988e33b commit 4ebdd36
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:

- run: pip install flit
- run: flit install --deps production --extras testing
- run: pip install "wagtail_modeladmin<2.0"

- type: cache-save
key: pip-{{ .Branch }}-{{ epoch }}
Expand Down
33 changes: 24 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist =
python{3.8,3.9,3.10}-django{3.2,4.1}-wagtail{4.1}-{sqlite,postgres12}
python{3.8,3.9,3.10,3.11}-django{4.2}-wagtail{5.1,5.2}-{sqlite,postgres15}
python{3.12}-django{4.2}-wagtail{5.2}-{sqlite,postgres15}
python{3.10,3.11,3.12}-django{5.0}-wagtail{5.2.2}-{sqlite,postgres15}
python{3.10,3.11,3.12}-django{5.0}-wagtail{5.2}-{sqlite,postgres15}

[gh-actions]
python =
Expand All @@ -26,8 +26,12 @@ pass_env =
FORCE_COLOR
NO_COLOR

install_command = pip install -e ".[testing]" -U {opts} {packages}
commands = coverage run testmanage.py test --deprecation all {posargs: -v 2}
use_frozen_constraints = true
constrain_package_deps = true

setenv =
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_localize}
PYTHONDEVMODE = 1

deps =
coverage
Expand All @@ -40,15 +44,26 @@ deps =

wagtail4.1: wagtail>=4.1,<4.2
wagtail5.1: wagtail>=5.1,<5.2
wagtail5.2: wagtail>=5.2,<5.3
wagtail5.2: wagtail>=5.2.2,<5.3
wagtailmain: git+https://github.com/wagtail/wagtail.git

# Pinned to work around UTC connection error
# https://stackoverflow.com/questions/68024060/assertionerror-database-connection-isnt-set-to-utc
postgres: psycopg2
wagtail{5.1,5.2,main}: wagtail_modeladmin<2.0

setenv =
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_localize}
postgres: psycopg2>=2.9

.[testing]

install_command = python -Im pip install --upgrade {opts} {packages}
commands =
python -Im coverage run testmanage.py test --deprecation all {posargs: -v 2}

[testenv:coverage-report]
base_python = python3.11
package = skip
deps =
coverage>=7.0,<8.0
commands =
python -Im coverage report -m


[testenv:interactive]
Expand Down

0 comments on commit 4ebdd36

Please sign in to comment.