-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ Adds nox and updates testing * ⚙️ Adds pip-compile recipe * ⬆️ Adds nox and re-freezes
- Loading branch information
1 parent
1e17658
commit efcfd5c
Showing
7 changed files
with
79 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@_default: | ||
just --list | ||
|
||
@fmt: | ||
just --fmt --unstable | ||
|
||
@nox *ARGS: | ||
nox --no-install --reuse-existing-virtualenvs {{ ARGS }} | ||
|
||
@pip-compile: | ||
pip-compile --resolver=backtracking | ||
|
||
@pre-commit: | ||
git ls-files -- . | xargs pre-commit run --config=.pre-commit-config.yaml --files | ||
|
||
@test *ARGS: | ||
nox --reuse-existing-virtualenvs {{ ARGS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import nox | ||
|
||
DJANGO_VERSIONS = ["2.2", "3.2", "4.0", "4.1"] | ||
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
INVALID_PYTHON_DJANGO_SESSIONS = [ | ||
("3.6", "4.0"), | ||
("3.6", "4.1"), | ||
("3.6", "4.2"), | ||
("3.7", "4.0"), | ||
("3.7", "4.1"), | ||
("3.7", "4.2"), | ||
("3.11", "3.2"), | ||
# ("3.11", "4.0"), | ||
# ("3.11", "4.1"), | ||
] | ||
|
||
|
||
@nox.session(python=PYTHON_VERSIONS, tags=["django"]) | ||
@nox.parametrize("django", DJANGO_VERSIONS) | ||
def tests(session: nox.Session, django: str) -> None: | ||
if (session.python, django) in INVALID_PYTHON_DJANGO_SESSIONS: | ||
session.skip() | ||
session.install(".[test]") | ||
session.install(f"django~={django}") | ||
session.run("pytest", *session.posargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE=sample.settings | ||
addopts = --reuse-db | ||
norecursedirs = build dist docs .eggs/* *.egg-info htmlcov test_plus .git .nox .* | ||
python_files = test*.py | ||
site_dirs = example/ | ||
testpaths = friendship |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
bumpversion | ||
check-manifest | ||
Django<4.2 | ||
pytest | ||
pytest-django | ||
pytest-cov | ||
pytest-pythonpath | ||
factory-boy | ||
flake8 | ||
nox | ||
pyflakes | ||
bumpversion | ||
pytest | ||
pytest-cov | ||
pytest-django | ||
pytest-pythonpath | ||
twine | ||
check-manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters