From a349cf125770ac934b9116fd6a3acbae507323ef Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 12:03:22 +0200 Subject: [PATCH 1/7] Update links.yml Signed-off-by: Glenn Jocher --- .github/workflows/links.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index a5413318030f..e1566b32f84d 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -1,5 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -# YOLO Continuous Integration (CI) GitHub Actions tests +# YOLO Continuous Integration (CI) GitHub Actions tests broken link checker +# Accept 429(Instagram, 'too many requests'), 999(LinkedIn, 'unknown status code'), Timeout(Twitter) name: Check Broken links @@ -18,21 +19,24 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Test Markdown and HTML links - uses: lycheeverse/lychee-action@v1.7.0 + - name: Download and install lychee + run: | + LYCHEE_URL=$(curl -s https://api.github.com/repos/lycheeverse/lychee/releases/latest | grep "browser_download_url" | grep "x86_64-unknown-linux-gnu.tar.gz" | cut -d '"' -f 4) + curl -L $LYCHEE_URL -o lychee.tar.gz + tar xzf lychee.tar.gz + sudo mv lychee /usr/local/bin + + - name: Test Markdown and HTML links with retry + uses: nick-invision/retry@v2 with: - fail: true - # accept 429(Instagram, 'too many requests'), 999(LinkedIn, 'unknown status code'), Timeout(Twitter) - args: --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci-testing.yaml' --exclude-mail './**/*.md' './**/*.html' - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + timeout_minutes: 5 + max_attempts: 3 + command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' - - name: Test Markdown, HTML, YAML, Python and Notebook links + - name: Test Markdown, HTML, YAML, Python and Notebook links with retry if: github.event_name == 'workflow_dispatch' - uses: lycheeverse/lychee-action@v1.7.0 + uses: nick-invision/retry@v2 with: - fail: true - # accept 429(Instagram, 'too many requests'), 999(LinkedIn, 'unknown status code'), Timeout(Twitter) - args: --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci-testing.yaml' --exclude-mail './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + timeout_minutes: 5 + max_attempts: 3 + command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' From 8f03abf727dce1cdd01fb2e0eaf02a3e950265f5 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 12:05:49 +0200 Subject: [PATCH 2/7] Update links.yml Signed-off-by: Glenn Jocher --- .github/workflows/links.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index e1566b32f84d..8845a87c0560 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -30,6 +30,7 @@ jobs: uses: nick-invision/retry@v2 with: timeout_minutes: 5 + delay_seconds: 30 max_attempts: 3 command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' @@ -38,5 +39,6 @@ jobs: uses: nick-invision/retry@v2 with: timeout_minutes: 5 + delay_seconds: 30 max_attempts: 3 command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' From 168e6285869c38d313ea265ac512e1d352490359 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 12:21:00 +0200 Subject: [PATCH 3/7] Update ci-testing.yml Signed-off-by: Glenn Jocher --- .github/workflows/ci-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 7de084fef06d..18f7c61043de 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -158,7 +158,7 @@ jobs: if: always() # This ensures the job runs even if previous jobs fail steps: - name: Check for failure and notify - if: ${{ needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' }} # Check if any of the jobs failed + if: ${{ needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' }} && github.repository == 'ultralytics/yolov5' && (github.event_name == 'schedule' || github.event_name == 'push') uses: slackapi/slack-github-action@v1.23.0 with: payload: | From 8a5f414b60f571700169c85c2be0eaa2c8fb5f22 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 12:32:57 +0200 Subject: [PATCH 4/7] Update links.yml Signed-off-by: Glenn Jocher --- .github/workflows/links.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 8845a87c0560..341bdcf8f8e8 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -30,7 +30,7 @@ jobs: uses: nick-invision/retry@v2 with: timeout_minutes: 5 - delay_seconds: 30 + retry_wait_seconds: 30 max_attempts: 3 command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' @@ -39,6 +39,6 @@ jobs: uses: nick-invision/retry@v2 with: timeout_minutes: 5 - delay_seconds: 30 + retry_wait_seconds: 30 max_attempts: 3 command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' From 20babdc440c4dafd3f2442020aed35c8ec92ff8c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 12:56:34 +0200 Subject: [PATCH 5/7] Update links.yml Signed-off-by: Glenn Jocher --- .github/workflows/links.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 341bdcf8f8e8..01b05b23ef87 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -32,7 +32,7 @@ jobs: timeout_minutes: 5 retry_wait_seconds: 30 max_attempts: 3 - command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' + command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci.yaml' --exclude-mail --github-token ${{ secrets.GITHUB_TOKEN }} './**/*.md' './**/*.html' - name: Test Markdown, HTML, YAML, Python and Notebook links with retry if: github.event_name == 'workflow_dispatch' @@ -41,4 +41,4 @@ jobs: timeout_minutes: 5 retry_wait_seconds: 30 max_attempts: 3 - command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci.yaml' --exclude-mail './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' + command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci.yaml' --exclude-mail --github-token ${{ secrets.GITHUB_TOKEN }} './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb' From e73376540e2027d617e02b43ddc9e6ffc4a78a22 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 14:03:14 +0200 Subject: [PATCH 6/7] Update ci-testing.yml Signed-off-by: Glenn Jocher --- .github/workflows/ci-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 18f7c61043de..e71a4b8f16ac 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -158,7 +158,7 @@ jobs: if: always() # This ensures the job runs even if previous jobs fail steps: - name: Check for failure and notify - if: ${{ needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' }} && github.repository == 'ultralytics/yolov5' && (github.event_name == 'schedule' || github.event_name == 'push') + if: (needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure') && github.repository == 'ultralytics/yolov5' && (github.event_name == 'schedule' || github.event_name == 'push') uses: slackapi/slack-github-action@v1.23.0 with: payload: | From 7ed5b905b5874c75c998d85cf5e5493686e0eb39 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 1 May 2023 14:14:26 +0200 Subject: [PATCH 7/7] updates --- .github/workflows/links.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 01b05b23ef87..306689f46507 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -30,7 +30,7 @@ jobs: uses: nick-invision/retry@v2 with: timeout_minutes: 5 - retry_wait_seconds: 30 + retry_wait_seconds: 60 max_attempts: 3 command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com --exclude-path '**/ci.yaml' --exclude-mail --github-token ${{ secrets.GITHUB_TOKEN }} './**/*.md' './**/*.html' @@ -39,6 +39,6 @@ jobs: uses: nick-invision/retry@v2 with: timeout_minutes: 5 - retry_wait_seconds: 30 + retry_wait_seconds: 60 max_attempts: 3 command: lychee --accept 429,999 --exclude-loopback --exclude twitter.com,url.com --exclude-path '**/ci.yaml' --exclude-mail --github-token ${{ secrets.GITHUB_TOKEN }} './**/*.md' './**/*.html' './**/*.yml' './**/*.yaml' './**/*.py' './**/*.ipynb'