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

Readme tests #89

Closed
wants to merge 2 commits into from
Closed

Readme tests #89

wants to merge 2 commits into from

Conversation

Dushistov
Copy link
Contributor

@Dushistov Dushistov commented Jan 17, 2019

skeptic add unnecessary build time dependencies, so I add only CI test which check that code in README.md is valid.

Copy link
Collaborator

@punkstarman punkstarman left a comment

Choose a reason for hiding this comment

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

I really like this idea.

Why not add this to the build proper?

This roundabout way of opting into this build step will break very easily upon changes to Cargo.toml in ways that don't seem obvious to me. It would be less of a problem if the ci/skeptic.sh script were more robust, maybe even using a TOML-savvy library instead of a combination of sed and appending.

I don't see much of a downside to having this step on every build. I see the upside that the contributor won't wait for CI to finish before noticing regressions in the documentation examples.

@RReverser
Copy link
Owner

Looking at the upstream issue about build dependency budziq/rust-skeptic#60, looks like someone created an alternative that can be added just as a dev-dependency: https://docs.rs/docmatic

This seems much nicer as it doesn't impose an extra dependency on downstream users of the crate, while still enables testing of README on both CI and contributors' machines.

@RReverser RReverser mentioned this pull request Jan 18, 2019
@RReverser
Copy link
Owner

I've created an alternative PR with fixes to README cherry-picked from here (thanks @Dushistov) but using docmatic for running tests: #90

@RReverser RReverser closed this Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants