Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Link Check

on:
# Run on PRs that touch the list
pull_request:
paths:
- "README.md"

# Run on pushes to master
push:
branches:
- master
paths:
- "README.md"

# Weekly scan (Sunday 06:00 UTC)
schedule:
- cron: "0 6 * * 0"

# Manual trigger
workflow_dispatch:

jobs:
link-check:
name: Check Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Restore link cache
id: restore-cache
uses: actions/cache/restore@v4
with:
path: .lycheecache
key: lychee-cache-${{ github.sha }}
restore-keys: lychee-cache-

- name: Check links in README.md
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: >-
--verbose
--no-progress
--cache
--max-cache-age 3d
--max-retries 3
--retry-wait-time 5
--max-concurrency 10
--timeout 30
--user-agent "Mozilla/5.0 (compatible; awesome-python-link-checker)"
'./README.md'
token: ${{ secrets.GITHUB_TOKEN }}
fail: true

- name: Save link cache
uses: actions/cache/save@v4
if: always()
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
12 changes: 12 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# LinkedIn blocks automated requests (always returns 999)
^https?://(www\.)?linkedin\.com

# Social media sites with aggressive bot detection
^https?://(www\.)?twitter\.com
^https?://x\.com
^https?://(www\.)?facebook\.com
^https?://(www\.)?instagram\.com

# Localhost / local development URLs
^https?://localhost
^https?://127\.0\.0\.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ _Libraries for testing codebases and generating test data._

- Testing Frameworks
- [hypothesis](https://github.com/HypothesisWorks/hypothesis) - Hypothesis is an advanced Quickcheck style property based testing library.
- [nose2](https://github.com/nose-devs/nose2) - The successor to `nose`, based on `unittest2.
- [nose2](https://github.com/nose-devs/nose2) - The successor to `nose`, based on `unittest2`.
- [pytest](https://docs.pytest.org/en/latest/) - A mature full-featured Python testing tool.
- [Robot Framework](https://github.com/robotframework/robotframework) - A generic test automation framework.
- [ScanAPI](https://pypi.org/project/scanapi/) - Automated Testing and Documentation for your REST API.
Expand Down
23 changes: 23 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Lychee link checker configuration
# https://lychee.cli.rs/usage/config/

# Treat 429 (rate-limited) responses as acceptable
accept = ["100..=103", "200..=299", "429"]

# Don't fail the check when a request times out
timeout = 30
accept_timeouts = true

# Retry settings
max_retries = 3
retry_wait_time = 5

# Be polite -- limit concurrent requests per host
max_concurrency = 10

# GitHub has the most links (528/708) -- throttle to avoid rate limits
[host."github.com"]

[host."pypi.org"]

[host."docs.python.org"]