-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (65 loc) · 2.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# required for docker
sudo: required
# for more information on configuring a rust travis build
# see https://docs.travis-ci.com/user/languages/rust/
language: rust
rust:
- stable
# for code coverage only
- nightly
# only build pushes to master
# prs are build separately
# https://docs.travis-ci.com/user/pull-requests/#how-pull-requests-are-built
branches:
only:
- master
# Cache `cargo install`ed tools, but don't cache the project's `target`
# directory (which ends up over-caching and filling all disk space!)
# https://levans.fr/rust_travis_cache.html
cache:
directories:
- /home/travis/.cargo
- node_modules
before_cache:
# But don't cache the cargo registry
- rm -rf /home/travis/.cargo/registry
services:
# start docker to enable lambda ci compatible build env
- docker
addons:
apt:
packages:
# required by tarpaulin code coverage tool
- libssl-dev
install: |
# https://github.com/xd009642/tarpaulin/issues/150
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f
fi
script:
# fail fast if build fails
- cargo check
# test changes to behavior
- cargo test
# package application here to cache build artifacts for future build/deploys
- make package
# report coverage to coveralls (on nightly)
# see https://github.com/xd009642/tarpaulin for more information
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
# Uncomment the following two lines create and upload a report for codecov.io
# cargo tarpaulin --out Xml
# bash <(curl -s https://codecov.io/bash)
fi
# deploy on pushes to master branch
# assumes aws credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
# are configured in travis settings
# see https://serverless.com/framework/docs/providers/aws/guide/credentials/
# for more information
deploy:
- provider: script
script: make dependencies deploy
skip_cleanup: true
on:
branch: master