diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b031831..7f01a71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,13 +6,20 @@ jobs: build: runs-on: ubuntu-latest - + strategy: + fail-fast: false + matrix: + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" steps: - uses: actions/checkout@v2 - - name: Set up Python 3.9 + - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: ${{ matrix.python-version }} - name: Run tox run: | python -m pip install --upgrade pip diff --git a/tests/polls/tests/test_admin.py b/tests/polls/tests/test_admin.py index 55a540d..9ea0145 100644 --- a/tests/polls/tests/test_admin.py +++ b/tests/polls/tests/test_admin.py @@ -15,6 +15,7 @@ import polls.tests.config as test_config from django_reverse_admin import ReverseModelAdmin + class AddressAdminTest(TestCase): def setUp(self): User.objects.create_superuser(**test_config.ADMIN_USER) diff --git a/tox.ini b/tox.ini index ec6d7e3..d421e7d 100644 --- a/tox.ini +++ b/tox.ini @@ -5,22 +5,30 @@ [tox] envlist = - py39 - unit + py3{8,9,10}-django{32} + py3{8,9,10,11}-django{42} + py3{10,11}-django{50} + lint [flake8] # E501 line too long (81 > 79 characters) ignore = E501, W504 -[testenv] +[testenv:lint] deps = flake8 +changedir = . commands = flake8 django_reverse_admin tests/polls/ -[testenv:unit] +[testenv] +set_env = + PYTHONDEVMODE=1 deps = - -rtests/requirements.txt + django32: Django>=3.2,<4.0 + django42: Django>=4.2,<5.0 + django50: Django>=5,<6.0 + djangomain: https://github.com/django/django/archive/main.tar.gz changedir = tests commands = {envpython} manage.py test