mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-10 23:14:52 +03:00
Changes made to the files
This commit is contained in:
parent
8bf4fba7b4
commit
1e2d0b3825
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -114,6 +114,7 @@ jobs:
|
||||||
- name: Bare Metal ${{ matrix.script.name }}
|
- name: Bare Metal ${{ matrix.script.name }}
|
||||||
run: sh tests/test_bare.sh ${{ matrix.script.args }}
|
run: sh tests/test_bare.sh ${{ matrix.script.args }}
|
||||||
|
|
||||||
|
|
||||||
production-check:
|
production-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -122,7 +123,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: pip
|
cache: pip
|
||||||
|
- name: Generate project
|
||||||
|
run: cookiecutter . --no-input project_slug=test_project
|
||||||
- name: Install production dependencies
|
- name: Install production dependencies
|
||||||
run: pip install -r {{cookiecutter.project_slug}}/requirements/production.txt
|
run: pip install -r test_project/requirements/production.txt
|
||||||
- name: Run Django deployment checks
|
- name: Run Django deployment checks
|
||||||
|
working-directory: test_project
|
||||||
run: python manage.py check --deploy
|
run: python manage.py check --deploy
|
|
@ -32,7 +32,7 @@ docker compose -f local.yml run django python manage.py makemessages --all
|
||||||
# Make sure the check doesn't raise any warnings
|
# 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 django python manage.py check --fail-level WARNING
|
||||||
|
|
||||||
# Check for deployment-specific issues
|
# Check for deployment specific issues
|
||||||
docker compose -f local.yml run django python manage.py check --deploy
|
docker compose -f local.yml run django python manage.py check --deploy
|
||||||
|
|
||||||
# Generate the HTML for the documentation
|
# Generate the HTML for the documentation
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
def test_production_check():
|
def test_production_check():
|
||||||
# This will raise an exception if there's an error
|
base_dir = os.getcwd()
|
||||||
subprocess.check_call(['python', 'manage.py', 'check', '--deploy'])
|
manage_py_path = os.path.join(base_dir, "test_project", "manage.py")
|
||||||
|
subprocess.check_call(['python', manage_py_path, 'check', '--deploy'])
|
Loading…
Reference in New Issue
Block a user