Add a test for testing as a dependency

This commit is contained in:
Elichai Turkel 2019-08-18 12:26:52 -04:00
parent 52ff97cddc
commit 89f73ea686
No known key found for this signature in database
GPG Key ID: 9383CDE9E8E66A7F
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,5 @@
language: rust language: rust
cache: cargo
addons: addons:
apt: apt:
@ -17,11 +18,13 @@ addons:
matrix: matrix:
include: include:
- rust: stable - rust: stable
env: DO_FUZZ=true DO_COV=true env: DO_FUZZ=true DO_COV=true AS_DEPENDENCY=true
- rust: beta - rust: beta
env: AS_DEPENDENCY=true
- rust: nightly - rust: nightly
env: DO_BENCH=true env: DO_BENCH=true AS_DEPENDENCY=true
- rust: 1.22.0 - rust: 1.22.0
env: AS_DEPENDENCY=true
script: script:
- ./contrib/test.sh - ./contrib/test.sh

View File

@ -38,3 +38,12 @@ if [ "$DO_BENCH" = true ]
then then
cargo bench --features unstable cargo bench --features unstable
fi fi
# Use as dependency if told to
if [ -n "$AS_DEPENDENCY" ]
then
cargo new dep_test
cd dep_test
echo 'bitcoin = { path = "..", features = ["use-serde"] }' >> Cargo.toml
cargo test --verbose
fi