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

WIP: Exclude some domains from link checker #320

Merged
merged 27 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
86cf0f5
Exclude some domains from link checker
erget Jan 6, 2023
91459a1
Only raise issue if lychee returns error
erget Jan 6, 2023
4114548
ID right step for checking non-0 status
erget Jan 6, 2023
3f7792e
Remove exclusion via arg
erget Jan 6, 2023
ad7c01a
Pass through env variables
erget Jan 6, 2023
8131fb1
Start creating issues from files again
erget Jan 6, 2023
740e79b
Create .lycheeignore
erget Jan 6, 2023
e0ab81d
master --> main
erget Jan 6, 2023
06ac3d5
Fix syntax
erget Jan 6, 2023
61b4592
Include more addresses to exclude
erget Jan 6, 2023
7946266
Annotate ignored files
erget Jan 6, 2023
4448a8c
Describe exclusions
erget Jan 6, 2023
e0d0442
Correct syntax in ignorefile
erget Jan 6, 2023
cac210b
Upgrade lychee version to create issue iff fail
erget Jan 6, 2023
a23c042
Revert version
erget Jan 6, 2023
9f8f729
Use latest v1
erget Jan 6, 2023
9200ba3
Revert to 1.0.4, upload report only on fail
erget Jan 6, 2023
c15cd91
Get rid of doubled docs
erget Jan 6, 2023
5bdc854
Test if removing a regex causes stuff to fail
erget Jan 6, 2023
0410e8a
Fiddle with env
erget Jan 6, 2023
5926853
Fail on bad links
erget Jan 6, 2023
a02e4e7
Update lycee-action version for link-checking workflow
sadielbartholomew Jan 13, 2023
7a5dace
Ensure failure of link-checking workflow job w/ any bad links
sadielbartholomew Jan 13, 2023
e37d569
Only check markdown in link-checking workflow
sadielbartholomew Jan 20, 2023
9198b48
Only check markdown of immediate dir. in link-checking workflow
sadielbartholomew Jan 20, 2023
695d26b
Remove HTML exclusions now unnecessary in link-checking workflow
sadielbartholomew Jan 20, 2023
e7143a4
Merge branch 'main' into exclude-known-domains-that-timeout
erget Apr 24, 2024
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
30 changes: 25 additions & 5 deletions .github/workflows/check_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,38 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check links
uses: lycheeverse/[email protected]
uses: actions/checkout@v3

# See exclusions in .lycheeignore, remove lines and give it a
# whirl if you're hunting broken links
- name: Check links
id: lychee
uses: lycheeverse/lychee-action@master
with:
fail: true
# We need to exclude the cf-conventions-1.2 and .3 build dirs
# because they lead to an error of:
# Error: Cannot read input content from file <relevant file>
# Caused by:
# stream did not contain valid UTF-8
# Note: --exclude-path only takes one input path, so we need
# to set it twice.
# Note also we define a .lycheeignore file to exclude some
# specific links for checking, instead of using --exclude.
args: >
--no-progress './*.md'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Upload report
if: ${{ always() }}
if: env.exit_code != 0
uses: actions/upload-artifact@v1
with:
name: Link check report
path: ./lychee/out.md

- name: Create Issue From File
if: env.lychee_exit_code != 0 # Only execute if check failed
uses: peter-evans/[email protected]
with:
title: Link Checker Report
Expand Down
3 changes: 3 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cfeditor.ceda.ac.uk
wps-web1.ceda.ac.uk
http://kitt.llnl.gov/trac/wiki/SatelliteData
Comment on lines +1 to +3
Copy link
Member

@sadielbartholomew sadielbartholomew Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move these link exclusions to the workflow file (check_links.yml) now via using --exclude <link> in the args, perhaps, just to keep everything together and since there are only a small number so that it won't bulk up the arg command too much?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a good idea, then everything's in one place 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Daniel - shall I make that conversion now? Or would you like to review first?

Copy link
Member Author

@erget erget Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, go ahead - it'll be transparent in the commit history. I'll cross-check, but with the intent of helping you have peace of mind, not because I feel the need to control.

2 changes: 1 addition & 1 deletion constitution.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ The standard names committee will make proposals for modification of conventions

The membership of the standard names committee should include representatives of the various scientific user communities of the CF standard.

[code-of-conduct]: (https://github.com/cf-convention/cf-conventions/blob/master/CODE_OF_CONDUCT.md)
[code-of-conduct]: https://github.com/cf-convention/cf-conventions/blob/main/CODE_OF_CONDUCT.md "Code of Conduct"