This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 3256754  [CI] Add timeout and retry to linkcheck (#20708)
3256754 is described below

commit 32567542536fa9e95ce2d87c8515fc6ec0ce8b9e
Author: Zhenghui Jin <[email protected]>
AuthorDate: Thu Oct 28 13:14:43 2021 -0700

    [CI] Add timeout and retry to linkcheck (#20708)
    
    * [CI] Add timeout and retry to linkcheck
    
    * update
    
    * mannually add timeout and retry
    
    * update
    
    * fix
---
 .github/workflows/link_check.yml | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml
index 16cb224..e405958 100644
--- a/.github/workflows/link_check.yml
+++ b/.github/workflows/link_check.yml
@@ -64,8 +64,21 @@ jobs:
           python -m pip install --user -e python
 
       - name: Link Check
+        env:
+          MAX_RETRY: 3
         run: |
-          cd docs/python_docs/python
-          make clean
-          make linkcheck EVAL=0
-        shell: bash
+          for run in {1..$MAX_RETRY}
+          do
+            cd docs/python_docs/python
+            make clean
+            timeout 10m make linkcheck EVAL=0
+            if [[ $? -eq 0 ]]
+            then
+              break
+            else
+              if [[ run -eq $MAX_RETRY ]]
+              then
+                exit 1
+              fi
+            fi
+          done

Reply via email to