mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 03:23:03 +00:00
Add .travis.yml
This commit is contained in:
parent
e7a1e9df78
commit
3a88ea3996
1 changed files with 25 additions and 0 deletions
25
.travis.yml
Normal file
25
.travis.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
Loading…
Reference in a new issue