Skip to content

Commit

Permalink
Merge pull request #295 from gutierri/fix/tox
Browse files Browse the repository at this point in the history
fix tox and add more python/django version suite tests
  • Loading branch information
gutierri authored May 3, 2024
2 parents cfd7218 + 57ccaf2 commit 126786b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/polls/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 13 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 126786b

Please sign in to comment.