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

ci: add lychee #200

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

ci: add lychee #200

wants to merge 6 commits into from

Conversation

hinto-janai
Copy link
Contributor

@hinto-janai hinto-janai commented Jun 28, 2024

What

  • Adds lychee to CI
  • Adds lychee.toml config file
  • Fixes some links

This checks if links are correct, this includes books, cargo docs, code, etc.

@github-actions github-actions bot added A-workspace Changes to a root workspace file or general repo file. A-ci Related to CI. labels Jun 28, 2024
@github-actions github-actions bot added the A-consensus Related to consensus. label Jun 28, 2024
Comment on lines +141 to +147
# Run `lychee` at:
# 1. The repo root (excluding `target/`)
# 2. Cuprate's cargo documentation
- name: Lychee
run: |
lychee . --exclude target
lychee target/doc/cuprate_*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is put inside ci.yml because we need access to target/doc.

This allows for scanning generated documentation, e.g. rpc/types have links that are generated with macros.

lychee.toml Outdated
Comment on lines 12 to 13
# Exclude URLs and mail addresses from checking (supports regex).
exclude = ["file://"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Crate type links are excluded since our cargo doc CI catches it.

Comment on lines +126 to +127
- name: Install dependencies (All)
run: cargo install lychee
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm leaning towards not mentioning this in CONTRIBUTING.md since:

  • Wrong links are infrequent
  • This CI will show them anyway

/// <https://cuprate.github.io/monero-book/consensus_rules/transactions/decoys.html>
/// <https://cuprate.github.io/monero-book/consensus_rules/transactions/inputs.html>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

decoys.html doesn't exist anymore, is this a good replacement?

@hinto-janai hinto-janai marked this pull request as ready for review June 28, 2024 20:41
@hinto-janai hinto-janai requested a review from Boog900 June 28, 2024 20:41
@hinto-janai
Copy link
Contributor Author

Going to fix CI first, sorry.

@hinto-janai hinto-janai marked this pull request as draft June 28, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Related to CI. A-consensus Related to consensus. A-workspace Changes to a root workspace file or general repo file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant