Skip to content

Commit

Permalink
check code in README with skeptic
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushistov committed Jan 17, 2019
1 parent 691dfcc commit b3c3841
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ matrix:
fast_finish: true
allow_failures:
- rust: nightly
before_script:
- sh ci/skeptic.sh
17 changes: 17 additions & 0 deletions ci/skeptic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

sed -i '/\[dev-dependencies\]/a skeptic = "0.13"' Cargo.toml

echo "[build-dependencies]
skeptic = \"0.13\"" >> Cargo.toml

cat <<EOT >> build.rs
extern crate skeptic;
fn main() {
// generates doc tests for `README.md`.
skeptic::generate_doc_tests(&["README.md"]);
}
EOT

echo 'include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs"));' > tests/skeptic.rs

0 comments on commit b3c3841

Please sign in to comment.