-
Notifications
You must be signed in to change notification settings - Fork 241
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
Add check-external-links command #4235
base: main
Are you sure you want to change the base?
Conversation
a66ac71
to
b3661f0
Compare
✅ You can preview this change here:
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ You can preview this change here:
To edit notification comments on pull requests, go to your Netlify site configuration. |
204fc6a
to
6cc2d93
Compare
6cc2d93
to
ffb4d09
Compare
06d8e38
to
b72e82f
Compare
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.
The command works fine locally, but I think we need a little extra work on the GitHub workflow to avoid issues if the cache has been deleted. Happy to pair if it's useful 😊
- name: Restore build | ||
uses: actions/cache/[email protected] | ||
with: | ||
key: build-cache-${{ runner.os }}-${{ github.sha }} | ||
path: build |
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.
issue This makes the workflow dependent on the build existing in GitHub actions' cache. Caches expire after 7 days without being used.
I think we need to look at sharing the build
job between the test
and check-external-links
workflow. This is something we do in govuk-frontend
if we need 'inspiration' 😉
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.
@romaricpascal I've had a go at this in 88178a8. I'm not feeling ultra confident about it, especially since js tests are failing and specifically calling out bad cahcing, which I suspect is the problem. Any advice?
b53996a
to
9a3a018
Compare
Co-Authored-By: Romaric Pascal <[email protected]>
Co-Authored-By: Calvin Lau <[email protected]>
51a44a4
to
88178a8
Compare
88178a8
to
d346675
Compare
Change
Adds a
check-external-links
npm script as an offshoot ofcheck-links
, creates a manual workflow for it and attempts to fix some initially reported broken links.This is a reimplementation of #3174 as a separate command. It's inadvisable to include this as a default part of our testing suite because:
However a separate comamnd we can run mean we have this tool that we can interpret whenever we want.
An early draft of this PR included the script in our default test suite in order to capture our current broken links. See the original test output of
check-external-links
here.The check additionally flagged broken links in our component docs which I've actioned in alphagov/govuk-frontend#5428
Controversial content updates
A few of the content changes I've chosen to make probably need further discussion. I'll note the tricky ones or lingering problems here: