Skip to content

Commit

Permalink
Run pip install from file
Browse files Browse the repository at this point in the history
  • Loading branch information
rycus86 committed Jul 26, 2018
1 parent d0bce57 commit 2e7ddba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .githooks/pre-commit/unit-tests
Expand Up @@ -10,9 +10,10 @@ if [ -z "$SKIP_DOCKER" ] && [ "$HAS_DOCKER" -eq "0" ]; then
*) FROM="python:2.7-alpine" ;;
esac

docker build -t demo-site-test-runner - << EOF > /dev/null
docker build -t demo-site-test-runner -f - . << EOF > /dev/null
FROM ${FROM}
RUN pip install $(cat requirements.txt | paste -s -d ' ')
ADD requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt
CMD PYTHONPATH=src python -m unittest discover -s tests -v
EOF
if [ "$?" -ne "0" ]; then
Expand Down

0 comments on commit 2e7ddba

Please sign in to comment.