-
Notifications
You must be signed in to change notification settings - Fork 46
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
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 91459a1
Only raise issue if lychee returns error
erget 4114548
ID right step for checking non-0 status
erget 3f7792e
Remove exclusion via arg
erget ad7c01a
Pass through env variables
erget 8131fb1
Start creating issues from files again
erget 740e79b
Create .lycheeignore
erget e0ab81d
master --> main
erget 06ac3d5
Fix syntax
erget 61b4592
Include more addresses to exclude
erget 7946266
Annotate ignored files
erget 4448a8c
Describe exclusions
erget e0d0442
Correct syntax in ignorefile
erget cac210b
Upgrade lychee version to create issue iff fail
erget a23c042
Revert version
erget 9f8f729
Use latest v1
erget 9200ba3
Revert to 1.0.4, upload report only on fail
erget c15cd91
Get rid of doubled docs
erget 5bdc854
Test if removing a regex causes stuff to fail
erget 0410e8a
Fiddle with env
erget 5926853
Fail on bad links
erget a02e4e7
Update lycee-action version for link-checking workflow
sadielbartholomew 7a5dace
Ensure failure of link-checking workflow job w/ any bad links
sadielbartholomew e37d569
Only check markdown in link-checking workflow
sadielbartholomew 9198b48
Only check markdown of immediate dir. in link-checking workflow
sadielbartholomew 695d26b
Remove HTML exclusions now unnecessary in link-checking workflow
sadielbartholomew e7143a4
Merge branch 'main' into exclude-known-domains-that-timeout
erget File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -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 | ||
|
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,3 @@ | ||
cfeditor.ceda.ac.uk | ||
wps-web1.ceda.ac.uk | ||
http://kitt.llnl.gov/trac/wiki/SatelliteData | ||
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 theargs
, perhaps, just to keep everything together and since there are only a small number so that it won't bulk up thearg
command too much?There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.