Skip to content

Commit

Permalink
Merge pull request #356 from egpbos/CI_link_checker_429
Browse files Browse the repository at this point in the history
[CI] update link checker and handle status 429 (too many requests)
  • Loading branch information
egpbos authored Oct 16, 2024
2 parents 186f513 + b46b85a commit c77f660
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
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

0 comments on commit c77f660

Please sign in to comment.