Skip to content

Commit c7b5619

Browse files
committed
travis: always test the latest beta and nightly
1 parent 70ce38d commit c7b5619

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

.travis.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
sudo: false
22
dist: trusty
3+
34
language: rust
45
cache: cargo
5-
rust:
6-
- stable
7-
- nightly-2018-01-20
86

97
env:
108
global:
119
- RUSTFLAGS=-Dwarnings
12-
# Versions known to work with pinned nightly.
10+
# Versions known to work with pinned nightly for lints.
1311
- CLIPPY_VERSION=0.0.180
1412

13+
matrix:
14+
include:
15+
- env: TASK=test
16+
rust: stable
17+
- env: TASK=test
18+
rust: beta
19+
- env: TASK=lint
20+
rust: nightly-2018-01-20
21+
allow_failures:
22+
- env: TASK=test
23+
rust: nightly
24+
1525
before_script:
1626
- export PATH=$HOME/.cargo/bin:$PATH
1727
- |
18-
if ! type -p cargo-install-update; then
19-
cargo install --force cargo-update
20-
else
21-
cargo install-update -i cargo-update
22-
fi
23-
- |
24-
if [[ $TRAVIS_RUST_VERSION =~ nightly-* ]]; then
28+
if [[ $TASK = "lint" ]]; then
29+
if ! type -p cargo-install-update; then
30+
cargo install --force cargo-update
31+
else
32+
cargo install-update -i cargo-update
33+
fi
34+
2535
rustup component add rustfmt-preview
2636
cargo install-update -i "clippy:$CLIPPY_VERSION"
2737
fi
2838
script:
2939
- |
30-
[[ ! $TRAVIS_RUST_VERSION =~ nightly-* ]] || cargo fmt -- --write-mode diff
31-
- cargo build && cargo test
32-
- |
33-
[[ ! $TRAVIS_RUST_VERSION =~ nightly-* ]] || cargo clippy
40+
if [[ $TASK = "lint" ]]; then
41+
cargo fmt -- --write-mode diff
42+
cargo clippy
43+
elif [[ $TASK = "test" ]]; then
44+
cargo build && cargo test
45+
fi

0 commit comments

Comments
 (0)