CI: Add Lychee CI test to check for broken links

Commit: 
https://github.com/vim/vim/commit/e32465190c22af35834c81f6e5f123533389e7b5
Author: Damien Lejay <dam...@lejay.be>
Date:   Sun Aug 10 10:28:58 2025 +0200

    CI: Add Lychee CI test to check for broken links
    
    closes: https://github.com/vim/vim/issues/17879
    
    Signed-off-by: Damien Lejay <dam...@lejay.be>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml
new file mode 100644
index 000000000..e16515f0d
--- /dev/null
+++ b/.github/workflows/link-check.yml
@@ -0,0 +1,15 @@
+# .github/workflows/link-check.yml
+name: Check Links
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '0 3 * * 0' # Every Sunday at 03:00 UTC
+jobs:
+  lychee:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: Run Lychee
+        uses: lycheeverse/lychee-action@v2
+        with:
+          args: --verbose --config ci/lychee.toml .
diff --git a/Filelist b/Filelist
index 5153ded57..b52506d75 100644
--- a/Filelist
+++ b/Filelist
@@ -12,6 +12,7 @@ SRC_ALL =     \
                .github/workflows/ci.yml \
                .github/workflows/codeql-analysis.yml \
                .github/workflows/coverity.yml \
+               .github/workflows/link-check.yml \
                .github/actions/test_artifacts/action.yml \
                .github/dependabot.yml \
                .gitignore \
@@ -24,6 +25,7 @@ SRC_ALL =     \
                ci/config.mk*.sed \
                ci/if_ver*.vim \
                ci/if_feat_check.vim \
+               ci/lychee.toml \
                ci/setup-xvfb.sh \
                ci/setup-sway.sh \
                ci/remove_snap.sh \
diff --git a/ci/lychee.toml b/ci/lychee.toml
new file mode 100644
index 000000000..4077e7795
--- /dev/null
+++ b/ci/lychee.toml
@@ -0,0 +1,47 @@
+#############################  Runtime  #############################
+
+# Reasonable concurrency to avoid rate-limiting small hosts.
+max_concurrency = 14
+
+# File extensions to scan
+extensions = ["c", "h", "md", "html", "txt"]
+
+#############################  Requests  ############################
+
+# Accepted status codes
+# - Include 429 (Too Many Requests) to avoid marking throttled links as dead.
+accept = ["100..=103", "200..=299", "429"]
+
+# Retry each request a few times on transient network errors
+retries = 2
+retry_wait_time = 2
+
+# Timeout per request in seconds
+timeout = 20
+
+#############################  Exclusions  ##########################
+
+exclude = [
+  '^https?://sys/file$',
+  '^file://.*',
+  '^https?://(www\.)?badges\.debian\.net/.*$',
+  '^https?://(www\.)?repology\.org/.*$',
+  '^https?://scan\.coverity\.com/.*$',
+  '^https?://(www\.)?img\.shields\.io/.*$',
+  '^https?://(www\.)?fossies\.org/.*$',
+  '^https?://(www\.)?adobe\.com.*$',
+  '^https?://(www\.)?google\.com.*$',
+  '^https?://(www\.)?forum\.vmssoftware\.com/.*$',
+  '^http://vim\.sourceforge\.net/scripts/script\.php\?script_id=40$',
+  '^https://is\.gd/.*$',
+  '^https://wiki\.contextgarden\.net/Vim$',
+  '^https://github\.com/you/foobar\.git$',
+  '^https?://flatassembler\.net',
+  '^https?://www\.fleiner\.com/vim/download.html',
+]
+
+# Lychee only reads UTF-8 files
+exclude_path = [
+  'src/po',
+  'src/testdir',
+]

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1ul1fy-0067CI-Nz%40256bit.org.

Raspunde prin e-mail lui