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

feat: add workflow to test readme generation #6359

Merged
merged 23 commits into from
Nov 14, 2024

Conversation

virajbhartiya
Copy link
Contributor

Description

Created a workflow to search for README.docify.md in the repo, and run cargo build --features generate-readme in the dir of the file (assuming it is related to a crate). If the git diff shows some output for the README.md, then the file update wasn't pushed on the branch, and the workflow fails.
Closes #6331

Integration

Downstream projects that want to adopt this README checking workflow should:

  1. Copy the .github/workflows/readme-check.yml file to their repository
  2. Ensure any README.docify.md files in their project follow the expected format
  3. Implement the generate-readme feature flag in their Cargo.toml if not already present

Review Notes

This PR adds a GitHub Actions workflow that automatically verifies README.md files are up-to-date with their corresponding README.docify.md sources. Key implementation details:

  • The workflow runs on both PRs and pushes to main
  • It finds all README.docify.md files recursively in the repository
  • For each file found:
    • Builds the project with --features generate-readme in that directory
    • Checks if the README.md has any uncommitted changes
    • Fails if any README.md is out of sync

@virajbhartiya virajbhartiya requested review from a team as code owners November 5, 2024 05:41
@cla-bot-2021
Copy link

cla-bot-2021 bot commented Nov 5, 2024

User @virajbhartiya, please sign the CLA here.

@virajbhartiya virajbhartiya changed the title add workflow feat: add workflow to test readme generation Nov 5, 2024
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
@virajbhartiya
Copy link
Contributor Author

I have made the changes according to the give code review, please do give it a look and let me know if any other changes are required

.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
@virajbhartiya
Copy link
Contributor Author

Could you please help me out with the 'check-prdoc' and 'check-labels' CI failure

Copy link
Contributor

@alvicsam alvicsam left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Requested some changes and also please add this jobs to the checks-quick.yml workflow file before the confirm-required-checks-quick-jobs-passed job instead of creating a new workflow file.

.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
.github/workflows/readme-check.yml Outdated Show resolved Hide resolved
@alvicsam alvicsam added the R0-silent Changes should not be mentioned in any release notes label Nov 7, 2024
@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 7, 2024 15:55
Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

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

Works great, thank you @virajbhartiya !

Copy link

Review required! Latest push from author must always be reviewed

@virajbhartiya
Copy link
Contributor Author

Can we merge this?

@iulianbarbu
Copy link
Contributor

@alvicsam can you take a look once more?

Copy link
Contributor

@alvicsam alvicsam left a comment

Choose a reason for hiding this comment

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

LGTM

@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 14, 2024 09:26
@iulianbarbu
Copy link
Contributor

iulianbarbu commented Nov 14, 2024

The review bot is not happy for some reason, requiring one more approve. I think it is required from release-engineering . @EgorPopelyaev can you take a look at this PR?

@iulianbarbu
Copy link
Contributor

The review bot is not happy for some reason, requiring one more approve. I think it is required from release-engineering . @EgorPopelyaev can you take a look at this PR?

Nope, my bad, looked better and the bot asked for another review from @paritytech/ci .

@iulianbarbu iulianbarbu added this pull request to the merge queue Nov 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 14, 2024
@alvicsam alvicsam added this pull request to the merge queue Nov 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 14, 2024
@iulianbarbu iulianbarbu added this pull request to the merge queue Nov 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 14, 2024
@iulianbarbu iulianbarbu added this pull request to the merge queue Nov 14, 2024
Merged via the queue into paritytech:master with commit 5da4063 Nov 14, 2024
194 of 197 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create CI workflow that checks README.docify.md's are in sync with README.mds
4 participants