Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many options in the testing matrix #4

Closed
jefftriplett opened this issue Sep 20, 2023 · 3 comments · Fixed by #131
Closed

Too many options in the testing matrix #4

jefftriplett opened this issue Sep 20, 2023 · 3 comments · Fixed by #131

Comments

@jefftriplett
Copy link
Contributor

It might be worth trimming down the tests. Testing against every version of Python and Django feels like overkill.

I think it's fine to:

  • Test against every supported Django version
  • Test against every supported Python version

I'm not sure we need or really want to test every Django version against every Python version.

@joshuadavidthomas
Copy link
Member

image

My inexperience with creating third-party, installable Django apps showing through. I'll defer to your judgment and experience on this.

@jefftriplett
Copy link
Contributor Author

All good. I'll probably drop DJ40 ala https://upgradedjango.com/4.0/

And then do some nox searching to see if anything sticks out.

@jefftriplett
Copy link
Contributor Author

I'm not sure that I like this pattern but it's what I have been mulling over:

@nox.session(python=PY_VERSIONS)
@nox.parametrize("django", DJ_VERSIONS)
def tests(session, django):
    skip = should_skip(session.python, django)
    if skip[0]:
        session.skip(skip[1])


@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
@nox.parametrize("django", ["3.2", "4.2"])
def pytest_django_lts(session, django):
    session.install(f"django=={django}")
    session.run("pytest")


@nox.session(python=["3.10", "3.11"])
def pytest_django_dev(session):
    session.install("https://github.com/django/django/archive/refs/heads/main.zip")
    session.run("pytest")


@nox.session(python=["3.11"])
@nox.parametrize("django", ["4.0", "4.1"])
def pytest_django_deprecation(session, django):
    session.install(f"django=={django}")
    session.run("pytest")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants