diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23cfbd0f..f0745086 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: with: name: generated path: testproject - + include-hidden-files: true build-docker-image: needs: bootstrap @@ -71,6 +71,10 @@ jobs: - name: setup buildx uses: docker/setup-buildx-action@v3 + - name: check .env file + run: | + cat testproject/src/app/.env + - name: make sure docker image is buildable uses: docker/build-push-action@v6 with: diff --git a/{{ cookiecutter.name }}/pyproject.toml b/{{ cookiecutter.name }}/pyproject.toml index ca4a3ca4..9a6a1638 100644 --- a/{{ cookiecutter.name }}/pyproject.toml +++ b/{{ cookiecutter.name }}/pyproject.toml @@ -62,7 +62,7 @@ pymarkdownlnt = "^0.9.21" pytest-deadfixtures = "^2.2.1" pytest-django = "^4.7.0" pytest-env = "^1.1.1" -pytest-freezegun = "^0.4.2" +pytest-freezer = "^0.4.8" pytest-mock = "^3.12.0" pytest-randomly = "^3.15.0" pytest-xdist = "^3.6.1" @@ -119,10 +119,6 @@ env = [ ] filterwarnings = [ "ignore:.*'rest_framework_jwt.blacklist' defines default_app_config.*You can remove default_app_config.::django", - "ignore:distutils Version classes are deprecated. Use packaging.version instead.:DeprecationWarning:pytest_freezegun:17", -] -markers = [ - "freeze_time: freezing time marker (pytest-freezegun does not register it)", ] python_files = ["test*.py"] pythonpath = ". src" diff --git a/{{ cookiecutter.name }}/src/app/conf/environ.py b/{{ cookiecutter.name }}/src/app/conf/environ.py index ad55b162..55bf8146 100644 --- a/{{ cookiecutter.name }}/src/app/conf/environ.py +++ b/{{ cookiecutter.name }}/src/app/conf/environ.py @@ -11,6 +11,10 @@ if envpath.exists(): env.read_env(envpath) +else: + from django.core.exceptions import ImproperlyConfigured + + raise ImproperlyConfigured(".env is missing") __all__ = [ "env",