Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] update link checker and handle status 429 (too many requests) #356

Merged
merged 5 commits into from
Oct 16, 2024
Merged
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
21 changes: 7 additions & 14 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Link Checker
on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -9,21 +10,13 @@ jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Link Checker
uses: lycheeverse/lychee-action@v1.7.0
uses: lycheeverse/lychee-action@v2
id: lychee
with:
# note: args has a long default value; when you override it, make sure you don't accidentally forget to include the default options you want! see https://github.com/lycheeverse/lychee-action/blob/master/action.yml
args: --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' --accept '100..=103,200..=299, 429'
env:
# This token is included to avoid github.com requests to error out with status 429 (too many requests). It only works for GitHub requests (also other GitHub REST API calls), not for the rest of the web.
GITHUB_TOKEN: ${{secrets.TOKEN_GITHUB}}
- name: Count broken links
run: |
broken_max=10
broken_count=$(printf "%d" $(grep "🚫 Errors" lychee/out.md | cut -d'|' -f3))
if [ "$broken_count" -gt "$broken_max" ]; then
echo "Number of broken links (${broken_count}) exceeds maximum allowed number (${broken_max})."
cat lychee/out.md
exit 1
else
echo "Number of broken links (${broken_count}) less than or equal to maximum allowed number (${broken_max})."
exit 0
fi
2 changes: 1 addition & 1 deletion best_practices/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ some of the things in this *scan* could be automated with continuous integration

### Citeable

Create a DOI for each release see [Making software citable](../citable_software/making_software_citable.md).
Create a DOI for each release see [Making software citable](https://book.the-turing-way.org/communication/citable/citable-cff.html?highlight=citable).

### Dissemination

Expand Down
2 changes: 1 addition & 1 deletion language_guides/ccpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ This all makes xtensor a very interesting choice compared to similar older libra


### Parallel processing
* [Intel TBB](https://www.threadingbuildingblocks.org) (Threading Building Blocks): template library for task parallelism
* [oneAPI Threading Building Blocks](https://oneapi-src.github.io/oneTBB/) (oneTBB): template library for task parallelism
* [ZeroMQ](http://zeromq.org): lower level flexible communication library with a unified interface for message passing between threads and processes, but also between separate machines via TCP.


Expand Down
2 changes: 1 addition & 1 deletion language_guides/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Having said that, there are many ways to run Python code in parallel:
There are convenient Python web frameworks available:

* [flask](http://flask.pocoo.org/)
* [cherrypy](http://www.cherrypy.org/)
* [CherryPy](https://cherrypy.dev/)
* [Django](https://www.djangoproject.com/)
* [bottle](http://bottlepy.org/) (similar to flask, but a bit more light-weight for a JSON-REST service)

Expand Down