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

workflows/docs: Check for broken links using the existing rake test task #15924

Merged
merged 11 commits into from Sep 1, 2023

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Aug 31, 2023

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

  • We had rake test as a task that uses html-proofer to scan for broken links, but we never actually ran it in CI or anywhere before building the site.
  • This will make things slower (or maybe it's taking ages because of my dodgy hotel internet connection), maybe we should only run it on a schedule as a separate job?
  • Fixes Use a link validator for markdown docs #15908.

@issyl0
Copy link
Member Author

issyl0 commented Aug 31, 2023

This gem needs Ruby 3.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Great idea!

.github/workflows/docs.yml Outdated Show resolved Hide resolved
docs/Rakefile Outdated Show resolved Hide resolved
- We had `rake test` as a task, but we never actually ran it in CI or
  anywhere before building the site.
- The `html-proofer` gem
  [only supports Ruby 3.1](https://github.com/gjtorikian/html-proofer/blob/main/html-proofer.gemspec#L20),
  so I bumped the linting job to use Ruby 3.1 across the board.
- This will make things slower (or maybe it's taking ages because of my
  dodgy hotel internet connection), maybe we should only run it on a
  schedule as a separate job?
- Fixes https://github.com/Homebrew/brew/issues/ 15908.
- It reports a lot of broken internal links that do actually exist, it's
  just file extension inference weirdness.
@issyl0 issyl0 marked this pull request as ready for review September 1, 2023 00:14
@issyl0 issyl0 merged commit 04ef90a into Homebrew:master Sep 1, 2023
25 checks passed
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Great work!

],
cache: {
timeframe: {
external: "1h"
Copy link
Member

Choose a reason for hiding this comment

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

@issyl0 does this setup the GitHub Actions cache across workflows? If not, might be a nice extension.

@issyl0 issyl0 deleted the docs-ci-broken-links branch September 1, 2023 11:20
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a link validator for markdown docs
3 participants