forked from knewbie/cargo-deps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (48 loc) · 1.06 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
env:
global:
- RUST_BACKTRACE=1
- PATH=$PATH:$HOME/.cargo/bin
os:
- linux
- osx
- windows
language: rust
rust:
- stable
- nightly
sudo: required
addons:
apt:
packages:
- libssl-dev
cache:
cargo: true
before_script: |
if [ "${TRAVIS_OS_NAME}" != windows ]; then
if [ "${TRAVIS_RUST_VERSION}" == nightly ]; then
rustup component add rustfmt;
fi
if [ "${TRAVIS_RUST_VERSION}" == stable ]; then
rustup component add clippy;
fi
fi
before_cache: |
if [ "${TRAVIS_OS_NAME}" == linux ]; then
cargo install cargo-tarpaulin -f
fi
script: |
set -x;
if [ "${TRAVIS_OS_NAME}" != windows ]; then
if [ "${TRAVIS_RUST_VERSION}" == nightly ]; then
cargo fmt -- --check
fi &&
if [ "${TRAVIS_RUST_VERSION}" == stable ]; then
cargo clippy --all-targets
fi
fi &&
cargo test --release --verbose
after_success: |
if [ "${TRAVIS_OS_NAME}" == linux ] && [ "${TRAVIS_RUST_VERSION}" == stable ]; then
# Coveralls
cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
fi