-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
37 lines (37 loc) · 1.01 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
language: rust
cache: cargo
rust:
- stable
- beta
- 1.52.0
jobs:
include:
- rust: 1.52.0
env: TEST_MINIMAL_VERSIONS=1
- rust: 1.52.0
env: LINT=1
before_install:
- |
if [ "${LINT:-0}" -ne 0 ] ; then
rustup component add clippy rustfmt
cargo clippy --version
cargo fmt --version
fi
- |
if [ "${TEST_MINIMAL_VERSIONS:-0}" -ne 0 ] ; then
rustup install nightly
fi
before_script:
# Use dependencies with minimal versions.
- |
if [ "${TEST_MINIMAL_VERSIONS:-0}" -ne 0 ] ; then
cargo +nightly update -Z minimal-versions
fi
script:
- if [ "${LINT:-0}" -eq 0 ] ; then cargo build --verbose --workspace --all-features && cargo test --verbose --workspace --all-features ; fi
# Fail if the code is correctly formatted.
- if [ "${LINT:-0}" -ne 0 ] ; then cargo fmt --all -- --check ; fi
# Fail if the code has warnings.
- if [ "${LINT:-0}" -ne 0 ] ; then cargo clippy --all-features -- --deny warnings ; fi
notifications:
email: false