Add setup helper script
This commit is contained in:
parent
bf025dc31e
commit
f81448bfd2
2 changed files with 18 additions and 2 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -17,5 +17,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev-requirements.txt') }}
|
key: pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev-requirements.txt') }}
|
||||||
- name: Install dependencies
|
- name: Install
|
||||||
run: pip install -r dev-requirements.txt
|
run: ./scripts/setup.sh
|
||||||
|
|
16
scripts/setup.sh
Executable file
16
scripts/setup.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export PATH=env/bin:${PATH}
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
python3 -m venv env
|
||||||
|
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
if [ "$DEBUG" != "false" ];
|
||||||
|
then
|
||||||
|
pip install -r dev-requirements.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
./manage.py collectstatic --noinput
|
Reference in a new issue