forked from PyAV-Org/PyAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
executable file
·53 lines (43 loc) · 1.13 KB
/
Copy pathtest
File metadata and controls
executable file
·53 lines (43 loc) · 1.13 KB
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
#!/bin/bash
# Exit as soon as something errors.
set -e
if [[ ! "$_PYAV_ACTIVATED" ]]; then
export here="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)"
source "$here/activate.sh"
fi
cd "$PYAV_ROOT"
if [[ ! "$TESTSUITE" ]]; then
if [[ "$TRAVIS" ]]; then
TESTSUITE=main
else
TESTSUITE=all
fi
fi
if [[ "$TESTSUITE" == all || "$TESTSUITE" == flake8 ]]; then
$PYAV_PYTHON -m flake8 av examples tests
if [[ "$TESTSUITE" != all ]]; then
# We've only gotten this far if it was successful.
exit
fi
fi
if [[ "$TESTSUITE" == all || "$TESTSUITE" == isort ]]; then
out="$($PYAV_PYTHON -m isort -df -rc -lai 2 examples tests)"
if [[ "$out" ]]; then
echo -n "$out"
exit 1
fi
if [[ "$TESTSUITE" != all ]]; then
exit
fi
fi
if [[ "$TESTSUITE" == all || "$TESTSUITE" == main ]]; then
$PYAV_PYTHON setup.py test
fi
if [[ "$TESTSUITE" == sdist ]]; then
$PYAV_PYTHON setup.py build_ext
$PYAV_PYTHON setup.py sdist
if [[ "$TRAVIS_TAG" ]]; then
$PYAV_PIP install twine
$PYAV_PYTHON -m twine upload --skip-existing dist/*
fi
fi