yewprint/.travis.yml
2020-09-23 09:00:35 +02:00

23 lines
616 B
YAML

sudo: false
language: rust
cache: cargo
os:
- linux
rust:
- stable
# NOTE: disable Travis' cache for now because it makes the Windows build fail
cache:
directories:
before_script:
- rustup component add rustfmt-preview clippy
# NOTE: will only run rustfmt and clippy if the branch is not main (and not for tags)
script:
- '[ "$TRAVIS_BRANCH" != main ] && [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] && rustfmt --check **/*.rs'
- '[ "$TRAVIS_BRANCH" != main ] && [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] && cargo clippy --all-targets --all-features -- -D warnings'
- cargo build
- cargo test
- cargo doc