Speeds up lint and test in docker by keeping the cache between invocations. (#5177)

* Add a volume to store the tox cache on the host. This gives quite some speed boost when running lint_docker and test_docker.

* Only map .tox directory for cache.
This commit is contained in:
Michaël Arnauts 2017-01-05 09:45:14 +01:00 committed by Paulus Schoutsen
parent 74aa8194d7
commit cb85128304
4 changed files with 18 additions and 4 deletions

View file

@ -4,5 +4,10 @@
# Stop on errors
set -e
cd "$(dirname "$0")/.."
docker build -t home-assistant-test -f virtualization/Docker/Dockerfile.dev .
docker run --rm -it home-assistant-test tox -e lint
docker run --rm \
-v `pwd`/.tox/:/usr/src/app/.tox/ \
-t -i home-assistant-test \
tox -e lint