Docker: Initialize pre-commit environments earlier

This commit is contained in:
Ole Schütt 2019-05-23 11:52:06 +02:00 committed by Ole Schütt
parent d7cf14fe28
commit 4c958eb136

View file

@ -23,3 +23,13 @@ rm -rf /var/lib/apt/lists/*
# install python packages
pip install --quiet numpy matplotlib requests
pip3 install --quiet numpy matplotlib requests pre-commit
cd /workspace/cp2k
echo -n "Warming cache by trying to run pre-commit hooks... "
if pre-commit run --all-files --hook-stage manual check-ast &> /dev/null ; then
echo "done."
else
echo "failed."
fi
#EOF