mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-11 15:34:51 +03:00
Minor changes made
This commit is contained in:
commit
5564279258
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -127,8 +127,8 @@ jobs:
|
||||||
run: pip 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 project dependencies
|
||||||
run: pip install -r test_project/requirements/production.txt
|
run: pip install -r test_project/requirements.txt
|
||||||
- name: Run Django deployment checks
|
- name: Run Django deployment checks
|
||||||
working-directory: test_project
|
working-directory: test_project
|
||||||
run: python manage.py check --deploy
|
run: python manage.py check --deploy
|
|
@ -1,14 +1,8 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
def test_production_check():
|
def test_production_check():
|
||||||
# Get the absolute path to the manage.py file
|
# Construct the absolute path to the manage.py file
|
||||||
base_dir = os.path.dirname(os.path.abspath(__file__))
|
manage_py_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_project", "manage.py")
|
||||||
manage_py_path = os.path.join(base_dir, '..', 'test_project', 'manage.py')
|
|
||||||
|
|
||||||
# Ensure the path exists before proceeding
|
# Assert that the manage.py file exists at the expected path
|
||||||
assert os.path.exists(manage_py_path), f"Expected path {manage_py_path} does not exist."
|
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'])
|
|
Loading…
Reference in New Issue
Block a user