/
.travis.yml
53 lines (46 loc) · 1.03 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
52
53
language: rust
rust:
- 1.43.0
- 1.44.1
- 1.45.1
- stable
- beta
- nightly
matrix:
include:
# Rustfmt
- rust: stable
install:
- rustup component add rustfmt-preview
before_script:
- cargo fmt --version
script:
- cargo fmt -- --check
env:
- CHECK_FORMAT=TRUE
# Clippy
- rust: stable
install:
- rustup component add clippy-preview
script:
# Fail if clippy output contains "error:" or "warning:"
- cargo clippy 2>&1 | tee ./clippy.out && ! grep -qe "error:\|warning:" ./clippy.out
env:
- CHECK_SYNTAX=TRUE
# Test coverage
- rust: nightly
install:
- RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin --force
script:
- cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
env:
- COVERAGE_CHECK=TRUE
script:
- cargo test
cache:
cargo: true
addons:
apt:
packages:
- libssl-dev # Required for tarpaulin
- gcc