-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2734 from agriyakhetarpal/lychee-URL-checking
Migrate to Lychee to check URLs
- Loading branch information
Showing
5 changed files
with
77 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Check URLs with Lychee | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
schedule: | ||
# Run everyday at 3 am UTC | ||
- cron: "0 3 * * *" | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# cache Lychee results to avoid hitting rate limits | ||
- name: Restore lychee cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: .lycheecache | ||
key: cache-lychee-${{ github.sha }} | ||
restore-keys: cache-lychee- | ||
|
||
# check URLs with Lychee | ||
- uses: actions/checkout@v3 | ||
|
||
# use stable version for now to avoid breaking changes | ||
- name: Lychee URL checker | ||
uses: lycheeverse/[email protected] | ||
with: | ||
# arguments with file types to check | ||
args: >- | ||
--cache | ||
--no-progress | ||
--max-cache-age 2d | ||
--timeout 10 | ||
--max-retries 5 | ||
--skip-missing | ||
--exclude-loopback | ||
--exclude https://twitter.com/pybamm_ | ||
--exclude "https://doi\.org|www.sciencedirect\.com/*" | ||
--accept 200,429 | ||
--exclude-path ./CHANGELOG.md | ||
--exclude-path ./scripts/update_version.py | ||
'./**/*.rst' | ||
'./**/*.md' | ||
'./**/*.py' | ||
'./**/*.ipynb' | ||
# fail the action on broken links | ||
fail: true | ||
env: | ||
# to be used in case rate limits are surpassed | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# a list of links/files to be ignored by lychee link checker (see workflow file) | ||
|
||
# Errors in docs/source/user_guide/getting_started.md | ||
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/api_docs | ||
|
||
# Errors in docs/source/user_guide/fundamentals/index.md | ||
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/base_battery_model | ||
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/parameter_sets | ||
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/quick_plot | ||
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/plot_voltage_components | ||
|
||
# Errors in docs/source/user_guide/index.md | ||
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/api_docs | ||
|
||
# Errors in examples/notebooks/README.md | ||
file:///home/runner/work/PyBaMM/PyBaMM/examples/notebooks/using-submodels.ipynb | ||
file:///home/runner/work/PyBaMM/PyBaMM/examples/notebooks/create-model.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters