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 - beta
before_script: before_script:
- "rustup component add rustfmt" - rustup component add rustfmt
- "rustup component add clippy" - rustup component add clippy
- "cargo install --force cargo-audit" - |
- "cargo generate-lockfile" if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
cargo install --force cargo-audit
fi
- cargo generate-lockfile
script: script:
- "cargo audit" - |
- "cargo fmt --all -- --check" if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
- "cargo clippy --all --all-targets --all-features -- -D warnings" cargo audit
- "cargo build --all --verbose" fi
- "cargo test --all --verbose" - 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)" if: "type != push OR (tag IS blank AND branch = master)"
notifications: notifications:
email: false email: false