File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ set -o pipefail
34
5+ EXIT_STATUS=0
46if ! python -m autopep8 --exit-code -a -r --global-config .config-pep8 -i . ; then
57 echo " Please run command 'python -m autopep8 -a -r --global-config .config-pep8 -i .' on your local and commit the result"
6- exit 1
8+ EXIT_STATUS= 1
79fi
810
911if ! python -m isort --check-only -rc . ; then
1012 echo " Please run command 'python -m isort -rc .' on your local and commit the result"
11- exit 1
13+ EXIT_STATUS= 1
1214fi
1315
14- python -m pylint --rcfile .pylintrc appium test --errors-only
15- python -m pytest test/unit/
16+ (
17+ LINT_RESULT=$( python -m pylint --rcfile .pylintrc appium test --errors-only 2>&1 | tee /dev/tty)
18+ if [[ $? -ne 0 ]] ; then
19+ EXIT_STATUS=1
20+ fi
21+
22+ # FIXME: pylint x Python 3.7 cause this runtime error.
23+ # We must remove here when we drop Python 2 (and can update pylint) or
24+ # install newer pylint for Python 3.7 environment on CI
25+ if [[ $LINT_RESULT =~ " RuntimeError: generator raised StopIteration" ]] ; then
26+ EXIT_STATUS=0
27+ fi
28+ )
29+
30+ (
31+ python -m pytest test/unit/
32+ )
33+ if [[ $? -ne 0 ]] ; then
34+ EXIT_STATUS=1
35+ fi
36+
37+ exit $EXIT_STATUS
You can’t perform that action at this time.
0 commit comments