]> git.scottworley.com Git - git-cache/blame - test.sh
Start on 1.2.0
[git-cache] / test.sh
CommitLineData
bef7ce53
SW
1#!/bin/sh
2
3set -e
4
5PARALLELISM=4
6
7find . -name build -prune -o -name dist -prune -o -name '*.py' -print0 |
8 xargs -0 mypy --strict --ignore-missing-imports --no-warn-unused-ignores
9
10python3 -m unittest
11
12if [ "$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
26fi