Skip to content

Commit a8eef9e

Browse files
committed
Run manage.py check with production settings
1 parent f00d698 commit a8eef9e

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

tests/test_docker.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# it is meant to be run from the root directory of the repository, eg:
44
# sh tests/test_docker.sh
55

6-
set -o errexit
6+
#set -o errexit
77
set -x
88

99
# create a cache directory
@@ -30,7 +30,17 @@ docker compose -f local.yml run django python manage.py makemigrations --dry-run
3030
docker compose -f local.yml run django python manage.py makemessages --all
3131

3232
# Make sure the check doesn't raise any warnings
33-
docker compose -f local.yml run django python manage.py check --fail-level WARNING
33+
docker compose -f local.yml run \
34+
-e DJANGO_SECRET_KEY="$(openssl rand -base64 64)" \
35+
-e REDIS_URL=redis://redis:6379/0 \
36+
-e CELERY_BROKER_URL=redis://redis:6379/0 \
37+
-e DJANGO_AWS_ACCESS_KEY_ID=x \
38+
-e DJANGO_AWS_SECRET_ACCESS_KEY=x \
39+
-e DJANGO_AWS_STORAGE_BUCKET_NAME=x \
40+
-e DJANGO_ADMIN_URL=x \
41+
-e MAILGUN_API_KEY=x \
42+
-e MAILGUN_DOMAIN=x \
43+
django python manage.py check --settings=config.settings.production --deploy --database default --fail-level WARNING
3444

3545
# Generate the HTML for the documentation
3646
docker compose -f local.yml run docs make html
@@ -40,3 +50,6 @@ if [ -f "package.json" ]
4050
then
4151
docker compose -f local.yml run node npm run build
4252
fi
53+
54+
docker compose -f local.yml down
55+
docker volume rm my_awesome_project_my_awesome_project_local_postgres_data

0 commit comments

Comments
 (0)