From 161ba75ff21bb8349a375907c6d2032313771127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Goran=20Meki=C4=87?= Date: Wed, 18 Mar 2020 16:59:52 +0100 Subject: [PATCH] Test SQL only --- bin/common.sh | 3 ++- bin/test.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/common.sh b/bin/common.sh index 1b81ffa..a2753ec 100644 --- a/bin/common.sh +++ b/bin/common.sh @@ -8,6 +8,7 @@ export VIRTUALENV=${VIRTUALENV:="${app_name}back"} export FLASK_ENV=${FLASK_ENV:="production"} export PY_VERSION=${PY_VERSION:="3.7"} export SYSPKG=${SYSPKG:="no"} +export DBTYPE=${DBTYPE:="sql"} setup() { @@ -22,7 +23,7 @@ setup() { if [ "${update}" != "no" ]; then pip install -U pip pip install -U wheel - pip install -e . + pip install -e ".[${DBTYPE}]" fi fi if [ -e "${BIN_DIR}/../migrations/main/001_initial.py" ]; then diff --git a/bin/test.sh b/bin/test.sh index c2944c6..9128492 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -6,6 +6,7 @@ set -e export BIN_DIR=`dirname $0` export PROJECT_ROOT="${BIN_DIR}/.." export FLASK_ENV="testing" + . ${BIN_DIR}/common.sh setup @@ -21,6 +22,7 @@ if [ "${CI}" = "ci" ]; then fi +cd "${PROJECT_ROOT}" rm -rf `find . -name __pycache__` rm -rf .pytest_cache flake8 .