From 62c93019c3dd0ffeea041c00b9b1f9c371e3b483 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 7 Feb 2022 23:04:45 +0100 Subject: [PATCH] readd settings for the github tests --- .github/workflows/publish.yml | 2 +- network_inventory/settings/ram_test.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 network_inventory/settings/ram_test.py diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 52c90cd..28f92fa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,7 +26,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest -nauto --ds=network_inventory.settings.local --nomigrations + pytest -nauto --ds=network_inventory.settings.ram_test --nomigrations publish: # Ensure test job passes before pushing image. diff --git a/network_inventory/settings/ram_test.py b/network_inventory/settings/ram_test.py new file mode 100644 index 0000000..e889f9d --- /dev/null +++ b/network_inventory/settings/ram_test.py @@ -0,0 +1,15 @@ +from .base import * + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'development_key' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True +CRISPY_FAIL_SILENTLY = not DEBUG + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:', + } +}