]> git.scottworley.com Git - git-cache/blob - test.sh
Rely on nixpkgs' python3Packages.backoff
[git-cache] / test.sh
1 #!/bin/sh
2
3 set -e
4
5 PARALLELISM=4
6
7 find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 |
8 xargs -0 mypy --strict --ignore-missing-imports --no-warn-unused-ignores --allow-untyped-decorators
9
10 python3 -m unittest
11
12 if [ "$1" = lint ];then
13
14 find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d invalid-name,missing-docstring
15
16 formatting_needs_fixing=$(
17 find . -name '*.py' -print0 |
18 xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
19 )
20 if [[ "$formatting_needs_fixing" ]];then
21 echo "Formatting needs fixing:"
22 echo "$formatting_needs_fixing"
23 exit 1
24 fi
25
26 fi