mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-10 23:14:52 +03:00
Minor changes
This commit is contained in:
commit
961c34c0dc
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -123,6 +123,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: pip
|
cache: pip
|
||||||
|
- name: Install Cookiecutter
|
||||||
|
run: pip install cookiecutter
|
||||||
- name: Generate project
|
- name: Generate project
|
||||||
run: cookiecutter . --no-input project_slug=test_project
|
run: cookiecutter . --no-input project_slug=test_project
|
||||||
- name: Install production dependencies
|
- name: Install production dependencies
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import pytest
|
||||||
|
|
||||||
def test_production_check():
|
def test_production_check():
|
||||||
base_dir = os.getcwd()
|
# Get the absolute path to the manage.py file
|
||||||
manage_py_path = os.path.join(base_dir, "test_project", "manage.py")
|
base_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
manage_py_path = os.path.join(base_dir, '..', 'test_project', 'manage.py')
|
||||||
|
|
||||||
|
# Ensure the path exists before proceeding
|
||||||
|
assert os.path.exists(manage_py_path), f"Expected path {manage_py_path} does not exist."
|
||||||
|
|
||||||
|
# Run the Django deployment checks
|
||||||
subprocess.check_call(['python', manage_py_path, 'check', '--deploy'])
|
subprocess.check_call(['python', manage_py_path, 'check', '--deploy'])
|
Loading…
Reference in New Issue
Block a user