1 Star 0 Fork 0

橙子/python-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ci.sh 971 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -o pipefail
EXIT_STATUS=0
if ! python -m autopep8 --exit-code -a -r --global-config .config-pep8 -i . ; then
echo "Please run command 'python -m autopep8 -a -r --global-config .config-pep8 -i .' on your local and commit the result"
EXIT_STATUS=1
fi
if ! python -m isort --check-only -rc . ; then
echo "Please run command 'python -m isort -rc .' on your local and commit the result"
EXIT_STATUS=1
fi
(
LINT_RESULT=$(python -m pylint --rcfile .pylintrc appium test --errors-only 2>&1 | tee /dev/tty)
if [[ $? -ne 0 ]] ; then
EXIT_STATUS=1
fi
# FIXME: pylint x Python 3.7 cause this runtime error.
# We must remove here when we drop Python 2 (and can update pylint) or
# install newer pylint for Python 3.7 environment on CI
if [[ $LINT_RESULT =~ "RuntimeError: generator raised StopIteration" ]] ; then
EXIT_STATUS=0
fi
)
(
python -m pytest test/unit/
)
if [[ $? -ne 0 ]] ; then
EXIT_STATUS=1
fi
exit $EXIT_STATUS
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuchengzhi/python-client.git
[email protected]:xuchengzhi/python-client.git
xuchengzhi
python-client
python-client
master

搜索帮助