2020-09-20 17:05:33 +00:00
|
|
|
language: rust
|
|
|
|
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:
|
2020-09-23 12:23:02 +00:00
|
|
|
- 'if [ -n "$TRAVIS_PULL_REQUEST" ]; then rustfmt --check **/*.rs; fi'
|
|
|
|
- 'if [ -n "$TRAVIS_PULL_REQUEST" ]; then cargo clippy --all-targets --all-features -- -D warnings; fi'
|
2020-09-23 16:33:41 +00:00
|
|
|
- cargo test --all-features
|
2020-09-20 17:05:33 +00:00
|
|
|
- cargo doc
|