-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
35 lines (35 loc) · 966 Bytes
/
.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
os: linux
language: rust
rust:
- stable
- nightly
jobs:
allow_failures:
- rust: nightly
env:
- RUST_BACKTRACE=full
addons:
apt:
packages:
- libssl-dev
cache: cargo
before_script:
- |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
cargo install cargo-tarpaulin
rustup component add clippy
rustup component add rustfmt
else
rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
rustup component add rustfmt --toolchain nightly || cargo install --git https://github.com/rust-lang/rustfmt/ --force fmt
fi
script:
- cargo fmt -- --check
- cargo test --all
- cargo clippy --all-targets --tests -- -D clippy::pedantic
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
USE_SKEPTIC=1 cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
echo "Uploaded code coverage"
fi