-
Notifications
You must be signed in to change notification settings - Fork 4
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
Doc test generator #15
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 this gets the job done nicely. No need to be too fancy here.
Regarding CI: We should have a step that checks no new files are created and also run the tests.
CI should also have a cronjob that runs the tests with the latest versions of our crates, so we notice when it breaks with new releases.
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'm not too familiar with Github Actions, but looks good to me.
Nice work and thanks for taking the initiative on this!
A quick little tool that visits all
.mdx
files, parses them usingpulldown-cmark
, and writes all codeblocks annotated with something like:into a separate test file, that applies the
core
template.There is nothing fancy about this, just some globbing, aggregating, and file creation.
Also supports Go blocks, but I'm not sure how to properly set up a working test environment for this, I'm just a poor little Rust dev.
This should either be a Git hook or we should have a CI step that ensures no new files have been created (probably both).