mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 22:44:54 +03:00
Improved test coverage of production build/config
This commit is contained in:
parent
52eaf46f49
commit
8bf4fba7b4
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -113,3 +113,16 @@ jobs:
|
|||
node-version: "18"
|
||||
- name: Bare Metal ${{ matrix.script.name }}
|
||||
run: sh tests/test_bare.sh ${{ matrix.script.args }}
|
||||
|
||||
production-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: pip
|
||||
- name: Install production dependencies
|
||||
run: pip install -r {{cookiecutter.project_slug}}/requirements/production.txt
|
||||
- name: Run Django deployment checks
|
||||
run: python manage.py check --deploy
|
|
@ -32,6 +32,9 @@ 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
|
||||
|
||||
# Check for deployment-specific issues
|
||||
docker compose -f local.yml run django python manage.py check --deploy
|
||||
|
||||
# Generate the HTML for the documentation
|
||||
docker compose -f local.yml run docs make html
|
||||
|
||||
|
|
5
tests/test_production_build.py
Normal file
5
tests/test_production_build.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
import subprocess
|
||||
|
||||
def test_production_check():
|
||||
# This will raise an exception if there's an error
|
||||
subprocess.check_call(['python', 'manage.py', 'check', '--deploy'])
|
Loading…
Reference in New Issue
Block a user