mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 08:40:11 +02:00
Add pre-push Git hook.
This commit is contained in:
parent
0f7665d3fd
commit
4984d4a6ad
1 changed files with 21 additions and 0 deletions
21
data/githooks/pre-push
Executable file
21
data/githooks/pre-push
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Checking code format with Black..."
|
||||
black -l 80 --check test roentgen roentgen.py || { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Lint with Flake8..."
|
||||
flake8 --max-line-length=80 --ignore=E203,W503 --exclude=archive,precommit.py,test/test_road.py || { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Run tests with pytest..."
|
||||
pytest -v || { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Test render"
|
||||
python3 roentgen.py render -b 37.415,55.753,37.416,55.754 --cache test/data || { echo "FAIL"; exit 1; }
|
||||
echo "Test icons"
|
||||
python3 roentgen.py icons || { echo "FAIL"; exit 1; }
|
||||
echo "Test MapCSS generation"
|
||||
python3 roentgen.py mapcss || { echo "FAIL"; exit 1; }
|
||||
echo "Test element generation"
|
||||
python3 roentgen.py element --node amenity=bench,material=wood || { echo "FAIL"; exit 1; }
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue