forked from lipanski/mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 872 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
36
37
38
39
40
language: rust
rust:
- 1.36.0 # minimum supported toolchain & pinned toolchain for clippy
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
branches:
only:
- master
env:
global:
- CLIPPY_RUST_VERSION=1.36.0
before_script:
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "$CLIPPY_RUST_VERSION" ]]; then
rustup component add clippy;
fi'
- bash -c 'if [ "$(rustup default | grep stable)" ]; then
rustup component add rustfmt;
fi'
script:
- cargo test
- bash -c 'if [ "$(rustup default | grep stable)" ]; then
echo "Checking code style...";
cargo fmt -- --check;
fi'
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "$CLIPPY_RUST_VERSION" ]]; then
cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery;
fi'
notifications:
email:
on_success: never