Skip to content

Instantly share code, notes, and snippets.

@dsisnero
Forked from LukeMathWalker/.travis.yml
Created September 7, 2022 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsisnero/6fd49fff742816207d0ead281c65042f to your computer and use it in GitHub Desktop.
Save dsisnero/6fd49fff742816207d0ead281c65042f to your computer and use it in GitHub Desktop.
Travis CI - Rust setup
language: rust
cache: cargo
rust:
- stable
before_cache: |
cargo install cargo-tarpaulin
before_script:
- rustup component add rustfmt
- rustup component add clippy
- cargo install cargo-audit
# As a result of https://github.com/travis-ci/travis-ci/issues/1066, we run
# everything in one large command instead of multiple commands.
# In this way, the build stops immediately if one of the commands fails.
script: |
cargo fmt --all -- --check &&
cargo clippy -- -D warnings &&
cargo build &&
cargo test &&
cargo audit
after_success: |
cargo tarpaulin --ignore-tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment