Skip to content

Commit

Permalink
Run manage.py check with production settings
Browse files Browse the repository at this point in the history
  • Loading branch information
foarsitter committed Feb 7, 2024
1 parent f00d698 commit a8eef9e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/test_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# it is meant to be run from the root directory of the repository, eg:
# sh tests/test_docker.sh

set -o errexit
#set -o errexit
set -x

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

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

# Generate the HTML for the documentation
docker compose -f local.yml run docs make html
Expand All @@ -40,3 +50,6 @@ if [ -f "package.json" ]
then
docker compose -f local.yml run node npm run build
fi

docker compose -f local.yml down
docker volume rm my_awesome_project_my_awesome_project_local_postgres_data

0 comments on commit a8eef9e

Please sign in to comment.