Skip to content

Commit d403c9e

Browse files
committed
init
0 parents  commit d403c9e

File tree

13 files changed

+4151
-0
lines changed

13 files changed

+4151
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.serverless
3+
target
4+
rustfmt.toml

.travis.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# required for docker
2+
sudo: required
3+
4+
# for more information on configuring a rust travis build
5+
# see https://docs.travis-ci.com/user/languages/rust/
6+
language: rust
7+
8+
rust:
9+
- stable
10+
# for code coverage only
11+
- nightly
12+
13+
# only build pushes to master
14+
# prs are build separately
15+
# https://docs.travis-ci.com/user/pull-requests/#how-pull-requests-are-built
16+
branches:
17+
only:
18+
- master
19+
20+
# Cache `cargo install`ed tools, but don't cache the project's `target`
21+
# directory (which ends up over-caching and filling all disk space!)
22+
# https://levans.fr/rust_travis_cache.html
23+
cache:
24+
directories:
25+
- /home/travis/.cargo
26+
- node_modules
27+
28+
before_cache:
29+
# But don't cache the cargo registry
30+
- rm -rf /home/travis/.cargo/registry
31+
32+
services:
33+
# start docker to enable lambda ci compatible build env
34+
- docker
35+
36+
addons:
37+
apt:
38+
packages:
39+
# required by tarpaulin code coverage tool
40+
- libssl-dev
41+
42+
install: |
43+
# https://github.com/xd009642/tarpaulin/issues/150
44+
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
45+
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f
46+
fi
47+
48+
script:
49+
# fail fast if build fails
50+
- cargo check
51+
# test changes to behavior
52+
- cargo test
53+
# package application here to cache build artifacts for future build/deploys
54+
- make package
55+
56+
# report coverage to coveralls (on nightly)
57+
# see https://github.com/xd009642/tarpaulin for more information
58+
after_success: |
59+
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
60+
cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
61+
62+
# Uncomment the following two lines create and upload a report for codecov.io
63+
# cargo tarpaulin --out Xml
64+
# bash <(curl -s https://codecov.io/bash)
65+
fi
66+
67+
# deploy on pushes to master branch
68+
# assumes aws credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
69+
# are configured in travis settings
70+
# see https://serverless.com/framework/docs/providers/aws/guide/credentials/
71+
# for more information
72+
deploy:
73+
- provider: script
74+
script: make dependencies deploy
75+
skip_cleanup: true
76+
on:
77+
branch: master

0 commit comments

Comments
 (0)