-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (40 loc) · 896 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
41
42
43
44
sudo: required
language: rust
cache: cargo
rust:
- stable
- beta
- nightly
# Required for tarpaulin (code coverage)
addons:
apt:
packages:
- libssl-dev
services:
- mongodb
os:
- linux
matrix:
allow_failures:
- rust: nightly
fast_finish: true
branches:
only:
- master
# Add code coverage with tarpaulin
before_cache: |
if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_RUST_VERSION" == stable ]]; then
cargo install cargo-tarpaulin -f
fi
before_script:
- sleep 15 # Give MongoDB some time to setup
- mongo --eval 'db.version();'
script:
- cargo build --verbose --all
- cargo test --verbose --all
# Save the code coverage result
after_success: |
if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_RUST_VERSION" == stable ]]; then
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
fi