Skip to content

Commit 06952b4

Browse files
committed
Test and build the book on travis
1 parent 6302805 commit 06952b4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.travis.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@ language: rust
33
env:
44
- RUSTFLAGS="-D warnings"
55

6-
before_script:
7-
- rustup component add rustfmt
8-
96
matrix:
107
fast_finish: true
118
include:
129
- rust: nightly
1310
os: linux
14-
env: BUILD_DOCS=1
11+
env: BUILD_DOCS=1 BUILD_BOOK=1
1512
- rust: nightly
1613
os: osx
1714
osx_image: xcode9.2
1815
env: BUILD_DOCS=1
1916
- rust: nightly-x86_64-pc-windows-msvc
2017
os: windows
2118

19+
before_script:
20+
- rustup component add rustfmt
21+
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
22+
- (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.3" mdbook)
23+
- cargo install-update -a
24+
2225
script:
23-
- cargo check --all --benches --bins --examples --tests
24-
- cargo test --all
26+
- if ![[ -n "$BUILD_BOOK" ]]; then cargo check --all --benches --bins --examples --tests && cargo test --all; fi
27+
- if [[ -n "$BUILD_BOOK" ]]; then cargo test --all --benches --bins --examples --tests; fi
2528
- cargo fmt --all -- --check
26-
- if [[ -n "$BUILD_DOCS" ]]; then cargo doc --features docs; fi
29+
- if [[ -n "$BUILD_DOCS" ]]; then cargo doc --features docs; fi
30+
- if [[ -n "$BUILD_BOOK" ]]; then mdbook build docs && mdbook test -L ./target/debug/deps docs; fi

0 commit comments

Comments
 (0)