1# Build only pushed (merged) master or any pull request. This avoids the 2# pull request to be build twice. 3branches: 4 only: 5 - master 6 7language: rust 8 9rust: 10 - stable 11 - nightly 12 13os: 14 - linux 15 - windows 16 - osx 17 18git: 19 depth: 1 20 quiet: true 21 22matrix: 23 allow_failures: 24 - rust: nightly 25 26before_script: 27 - export PATH=$PATH:/home/travis/.cargo/bin 28 - rustup component add rustfmt 29 - rustup component add clippy 30 31script: 32 - cargo fmt --version 33 - rustup --version 34 - rustc --version 35 - if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then cargo fmt --all -- --check; fi 36 - cargo clippy -- -D clippy::all 37 - cargo build 38 - cargo test --lib -- --nocapture --test-threads 1 39 - cargo test --lib --features serde -- --nocapture --test-threads 1 40 - cargo test --lib --features event-stream -- --nocapture --test-threads 1 41 - cargo test --all-features -- --nocapture --test-threads 1 42 - if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then cargo package; fi 43