diff --git a/.travis.yml b/.travis.yml index e8a1ae34..9a5d4568 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,16 +6,22 @@ rust: - beta before_script: - - "rustup component add rustfmt" - - "rustup component add clippy" - - "cargo install --force cargo-audit" - - "cargo generate-lockfile" + - rustup component add rustfmt + - rustup component add clippy + - | + if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then + cargo install --force cargo-audit + fi + - cargo generate-lockfile script: - - "cargo audit" - - "cargo fmt --all -- --check" - - "cargo clippy --all --all-targets --all-features -- -D warnings" - - "cargo build --all --verbose" - - "cargo test --all --verbose" + - | + if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then + cargo audit + fi + - cargo fmt --all -- --check + - cargo clippy --all --all-targets --all-features -- -D warnings + - cargo build --all --verbose + - cargo test --all --verbose if: "type != push OR (tag IS blank AND branch = master)" notifications: email: false