-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (54 loc) · 1.34 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
language: rust
matrix:
include:
- services: docker
env:
- LINT=true
- services: docker
env:
- COVERAGE=true
- rust: stable
sudo: false
env:
- DOC=true
- rust: stable
sudo: false
- rust: beta
sudo: false
- rust: nightly
sudo: false
fast_finish: true
before_script:
- set -e
- |
if [ "$LINT" = "true" ]; then
docker-compose -f docker-compose.lint-test.yml build lint-test
elif [ "$COVERAGE" = "true" ]; then
echo "Coverage does not deal with before_script"
elif [ "$DOC" = "true" ]; then
echo "Doc does not deal with before_script"
else
cargo test --all --no-run --verbose
fi
script:
- |
if [ "$LINT" = "true" ]; then
docker-compose -f docker-compose.lint-test.yml run lint-test
elif [ "$COVERAGE" = "true" ]; then
echo "Coverage does not deal with script"
elif [ "$DOC" = "true" ]; then
cargo doc --all
else
cargo test --all --verbose
fi
after_success:
- |
if [ "$COVERAGE" = "true" ]; then
docker run --security-opt seccomp=unconfined -v "$PWD:/volume" \
guangie88/ubuntu-cargo-tarpaulin:xenial-stable "
cargo tarpaulin --all --out Xml \
&& bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN"
fi
branches:
only:
- master