| 1 | [tox] |
| 2 | envlist = |
| 3 | py38-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite}, |
| 4 | py39-{dj30,dj31,dj32,dj40,dj41,dj42}-{sqlite}, |
| 5 | py310-{dj32,dj40,dj41,dj42,dj50}-{sqlite}, |
| 6 | py311-{dj41,dj42,dj50}-{sqlite}, |
| 7 | py312-{dj42,dj50}-{sqlite}, |
| 8 | |
| 9 | [gh-actions] |
| 10 | python = |
| 11 | 3.8: py38 |
| 12 | 3.9: py39 |
| 13 | 3.10: py310 |
| 14 | 3.11: py311 |
| 15 | 3.12: py312 |
| 16 | |
| 17 | [testenv] |
| 18 | passenv = CI,GITHUB_WORKFLOW |
| 19 | |
| 20 | setenv = |
| 21 | sqlite: DATABASE_ENGINE=sqlite |
| 22 | |
| 23 | deps = |
| 24 | dj30: Django == 3.0.* |
| 25 | dj31: Django == 3.1.* |
| 26 | dj32: Django == 3.2.* |
| 27 | dj40: Django == 4.0.* |
| 28 | dj41: Django == 4.1.* |
| 29 | dj42: Django == 4.2.* |
| 30 | dj50: Django == 5.0.* |
| 31 | -r requirements.txt |
| 32 | -r requirements-test.txt |
| 33 | |
| 34 | commands = |
| 35 | pre-commit run -a |
| 36 | coverage run --append --source=colorfield runtests.py |
| 37 | coverage report --show-missing --ignore-errors |
| 38 | |
| 39 | [testenv:migrations] |
| 40 | setenv = |
| 41 | DJANGO_SETTINGS_MODULE=tests.settings |
| 42 | DATABASE_ENGINE=sqlite |
| 43 | deps = |
| 44 | -r requirements.txt |
| 45 | commands = |
| 46 | python -m django makemigrations --check |
| 47 | |
| 48 | [testenv:translations] |
| 49 | setenv = |
| 50 | DJANGO_SETTINGS_MODULE=tests.settings |
| 51 | DATABASE_ENGINE=sqlite |
| 52 | deps = |
| 53 | -r requirements.txt |
| 54 | allowlist_externals = git |
| 55 | commands = |
| 56 | python -m django makemessages --ignore ".tox" --ignore "venv" --all --add-location "file" --extension "html,py" |
| 57 | python -m django compilemessages --ignore ".tox" --ignore "venv" |
| 58 | git diff colorfield/locale/ |
| 59 | git diff-index --quiet HEAD colorfield/locale/ |