未验证 提交 160d0f13 编写于 作者: Z zhouwei25 提交者: GitHub

fix the CI risk that network cannot be connected (#22736)

上级 15c26671
...@@ -540,14 +540,16 @@ function check_approvals_of_unittest() { ...@@ -540,14 +540,16 @@ function check_approvals_of_unittest() {
check_times=$1 check_times=$1
if [ $check_times == 1 ]; then if [ $check_times == 1 ]; then
approval_line=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000` approval_line=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000`
APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 22165420 52485244 6836917` if [ "${approval_line}" != "" ]; then
set +x APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 22165420 52485244 6836917`
echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}" set +x
if [ "${APPROVALS}" == "TRUE" ]; then echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
echo "===================================" if [ "${APPROVALS}" == "TRUE" ]; then
echo -e "\n current pr ${GIT_PR_ID} has got approvals. So, Pass CI directly!\n" echo "==================================="
echo "===================================" echo -e "\n current pr ${GIT_PR_ID} has got approvals. So, Pass CI directly!\n"
exit 0 echo "==================================="
exit 0
fi
fi fi
elif [ $check_times == 2 ]; then elif [ $check_times == 2 ]; then
unittest_spec_diff=`python ${PADDLE_ROOT}/tools/diff_unittest.py ${PADDLE_ROOT}/paddle/fluid/UNITTEST_DEV.spec ${PADDLE_ROOT}/paddle/fluid/UNITTEST_PR.spec` unittest_spec_diff=`python ${PADDLE_ROOT}/tools/diff_unittest.py ${PADDLE_ROOT}/paddle/fluid/UNITTEST_DEV.spec ${PADDLE_ROOT}/paddle/fluid/UNITTEST_PR.spec`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册