From f81448bfd282ec053c18b092b2f01c7948e802a4 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 12 Apr 2020 15:35:36 +0100 Subject: [PATCH] Add setup helper script --- .github/workflows/ci.yml | 4 ++-- scripts/setup.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 scripts/setup.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1b37e6..1106711 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,5 +17,5 @@ jobs: with: path: ~/.cache/pip key: pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev-requirements.txt') }} - - name: Install dependencies - run: pip install -r dev-requirements.txt + - name: Install + run: ./scripts/setup.sh diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..7bc2e37 --- /dev/null +++ b/scripts/setup.sh @@ -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