Add abililty to use system python
Moving virtual environments between systems is problematic... and unnecessary when creating container images. These modifications allow the ability to install app dependencies into the system python, and use that instead of a virtual environment.
This commit is contained in:
15
script/test
15
script/test
@@ -1,12 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# script/test: Run static code checks and unit tests
|
||||
|
||||
# If a command fails, exit the script
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
pipenv run pylint app.py atst/ tests/
|
||||
if [ -z "${SKIP_PIPENV+xxxx}" ]; then
|
||||
CMD_PREFIX='pipenv run '
|
||||
fi
|
||||
PYLINT_CMD="${CMD_PREFIX}pylint"
|
||||
PYTHON_CMD="${CMD_PREFIX}python"
|
||||
|
||||
# Run lint check
|
||||
echo "Running lint..."
|
||||
${PYLINT_CMD} app.py atst/ tests/
|
||||
|
||||
# Run unit tests
|
||||
pipenv run python -m pytest -s $*
|
||||
echo "Running unit tests..."
|
||||
${PYTHON_CMD} -m pytest -s $*
|
||||
|
Reference in New Issue
Block a user