travis: Only run cargo-audit on stable

… since there's no benefit in running it multiple times and cargo-audit
can't be built with older versions of rustc (at the time of writing,
cargo-audit has a minimum rustc version of 1.36.0)
This commit is contained in:
Jonas Platte 2019-10-23 02:46:11 +02:00
parent 09378eb410
commit 09a5e80472

View File

@ -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