-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpre-commit-check
More file actions
executable file
·56 lines (46 loc) · 1012 Bytes
/
pre-commit-check
File metadata and controls
executable file
·56 lines (46 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash -x
if black firecrown/ examples/ tests/; then
echo "black ok"
else
echo "black failed"
exit 1
fi
if flake8 firecrown/ examples/ tests/; then
echo "flake8 ok"
else
echo "flake8 failed"
exit 1
fi
if pylint firecrown; then
echo "pylint ok for firecrown"
else
echo "pylint failed for firecrown"
exit 1
fi
if pylint pylint_plugins; then
echo "pylint ok for pylint_plugins"
else
echo "pylint failed for pylint_plugins"
exit 1
fi
if pylint --rcfile tests/pylintrc tests; then
echo "pylint ok for tests"
else
echo "pylint failed for tests"
exit 1
fi
if pylint --rcfile examples/pylintrc examples; then
echo "pylint ok for examples"
else
echo "pylint failed for examples"
exit 1
fi
if mypy -p firecrown -p examples -p tests; then
echo "mypy ok"
else
echo "mypy failed"
exit 1
fi
rm -f coverage.json
rm -rf htmlcov
pytest --numprocesses auto --durations 10 --cov firecrown --cov-report json --cov-report html --cov-report term-missing --cov-branch