Skip to content

Commit

Permalink
add django up function to cookiecutter noxfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Jul 5, 2024
1 parent a2972e5 commit d9240e4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def crufted_project(session, cruft_config):
project_path = tmpdir_path / cruft_config["package_name"]
if not project_path.exists():
session.log("Creating project in %s", tmpdir.name)
# project_path.mkdir(parents=True)
with with_dirty_commit(session):
session.run(
"cruft",
Expand Down Expand Up @@ -228,6 +227,15 @@ def rm_root_owned(session, dirpath):
)


@contextlib.contextmanager
def docker_up(session):
session.run("docker", "compose", "up", "-d")
try:
yield
finally:
session.run("docker", "compose", "down", "-v", "--remove-orphans")


@nox.session(python=PYTHON_DEFAULT_VERSION, tags=["crufted_project"])
@nox.parametrize("cruft_config_name", CRUFT_TESTED_CONFIGS)
def lint_crufted_project(session, cruft_config_name):
Expand Down

0 comments on commit d9240e4

Please sign in to comment.