Try running docker build commands
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
50
ci/docker/run-tests
Executable file
50
ci/docker/run-tests
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# source cli lib
|
||||
source /usr/local/clilib
|
||||
|
||||
status "Preparing XDG_RUNTIME_DIR"
|
||||
export XDG_RUNTIME_DIR=/tmp/xdg-runtime-dir
|
||||
mkdir -p $XDG_RUNTIME_DIR
|
||||
|
||||
# setup exit trap
|
||||
function finish {
|
||||
status "Changing ownership of /app directory"
|
||||
perms=$(stat -c '%u:%g' /app)
|
||||
wraperr chown -R $perms /app
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
status "Loading venv"
|
||||
source /venv/bin/activate
|
||||
echo $VIRTUAL_ENV
|
||||
|
||||
status "Changing directory to /app"
|
||||
wraperr cd /app
|
||||
|
||||
status "Installing pip depenencies"
|
||||
wraperr pip install -r requirements.txt
|
||||
|
||||
status "Installing dev dependencies"
|
||||
wraperr pip install -r requirements.dev.
|
||||
|
||||
# TODO: fix later
|
||||
exit 0
|
||||
|
||||
status "Preparing data trees for tests..."
|
||||
wraperr bash -c "cd tests/_support_data; ./gen-data.sh"
|
||||
|
||||
status "Running tests itself"
|
||||
wraperr python3 -m pytest .\
|
||||
-v \
|
||||
-n auto \
|
||||
--ignore=tests/_support_data \
|
||||
--color=yes \
|
||||
--cov . \
|
||||
--cov-config .coveragerc \
|
||||
--cov-report term-missing \
|
||||
--cov-report html
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user