]> git.scottworley.com Git - pinch/blame - test.sh
Omit build directories from mypy run
[pinch] / test.sh
CommitLineData
2f96f32a
SW
1#!/bin/sh
2
3set -e
4
5PARALLELISM=4
6
b365b524
SW
7find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 |
8 xargs -0 mypy --strict --ignore-missing-imports
2f96f32a 9
49d58bdf 10for test in tests/*;do
a2290fb1
SW
11 if [ ! -d "$test" ];then
12 "$test"
13 fi
49d58bdf
SW
14done
15
2f96f32a
SW
16find . -name '*_test.py' -print0 | xargs -0 -r -n1 python3
17
7fcc18a2 18find . -name '*.py' -print0 | xargs -0 pylint --reports=n --persistent=n --ignore-imports=y -d fixme,invalid-name,missing-docstring,subprocess-run-check,too-few-public-methods
2f96f32a
SW
19
20formatting_needs_fixing=$(
21 find . -name '*.py' -print0 |
22 xargs -P "$PARALLELISM" -0 -n1 autopep8 --diff -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
23)
24if [[ "$formatting_needs_fixing" ]];then
25 echo "Formatting needs fixing:"
26 echo "$formatting_needs_fixing"
27 exit 1
28fi