forked from media-io/yaserde
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
78 lines (71 loc) · 1.66 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
language: rust
rust:
# error on #[non_exhaustive] being "experimental"
# - 1.36.0
# - 1.37.0
# error on cfg(doctest)
# - 1.38.0
# - 1.39.0
- 1.40.0
- 1.41.0
- 1.42.0
- 1.43.0
- 1.44.0
- 1.45.0
- 1.46.0
- 1.47.0
- 1.48.0
- 1.49.0
- 1.50.0
- 1.51.0
- 1.52.0
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
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 (with Tarpaulin)
- rust: stable
# To avoid "Error: EPERM: operation not permitted" error (see https://github.com/valery-barysok/session-file-store/issues/58)
sudo: true
install:
- RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin --force
script:
- cargo tarpaulin -v --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
env:
- COVERAGE_MEASUREMENT=true
script:
- cargo test
# Need to cache the whole `.cargo` directory to keep .crates.toml for
# cargo-update to work
cache:
directories:
- /home/travis/.cargo
# But don't cache the cargo registry
before_cache:
- rm -rf /home/travis/.cargo/registry
addons:
apt:
packages:
- libssl-dev # Required for tarpaulin