forked from cookiecutter/cookiecutter-django
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_bare.sh
More file actions
executable file
·37 lines (28 loc) · 882 Bytes
/
test_bare.sh
File metadata and controls
executable file
·37 lines (28 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# this is a very simple script that tests the docker configuration for cookiecutter-django
# it is meant to be run from the root directory of the repository, eg:
# sh tests/test_bare.sh
set -o errexit
set -x
# create a cache directory
mkdir -p .cache/bare
cd .cache/bare
# create the project using the default settings in cookiecutter.json
uv run cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n "$@"
cd my_awesome_project
# Install OS deps
sudo utility/install_os_dependencies.sh install
# Install Python deps
uv sync
# run the project's tests
uv run pytest
# Make sure the check doesn't raise any warnings
uv run python manage.py check --fail-level WARNING
# Run npm build script if package.json is present
if [ -f "package.json" ]
then
npm install
npm run build
fi
# Generate the HTML for the documentation
cd docs && uv run make html