forked from CodeChain-io/codechain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
97 lines (96 loc) · 3.25 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
language: rust
rust:
- 1.32.0
stages:
- name: test
if: branch != docker-build
- name: deploy
if: branch = docker-build
jobs:
include:
- stage: test
name: osx
os: osx
before_install:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^(docs|spec)/'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^test/'` && if [[ "$SKIP" = "noskip" ]]; then RUN_UNIT_TEST=1; fi
install:
- nvm install 10
- nvm use 10
- npm install -g yarn
before_script:
- cargo fetch --verbose
script:
- if [[ $RUN_UNIT_TEST ]]; then RUST_BACKTRACE=1 cargo test --verbose --all; fi
- cargo build || exit 1
- cd test && yarn || exit 1
- INT_TEST_FLAG=true && yarn start-short
- yarn start-long
after_failure:
- test $INT_TEST_FLAG && ./upload_logs.sh
- os: linux
name: linux
before_install:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^(docs|spec)/'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^test/'` && if [[ "$SKIP" = "noskip" ]]; then RUN_UNIT_TEST=1; fi
install:
- nvm install 10
- nvm use 10
- npm install -g yarn
before_script:
- cargo fetch --verbose
script:
- if [[ $RUN_UNIT_TEST ]]; then RUST_BACKTRACE=1 cargo test --verbose --all; fi
- cargo build || exit 1
- cd test && yarn || exit 1
- INT_TEST_FLAG=true && yarn start-short
- yarn start-long
after_failure:
- test $INT_TEST_FLAG && ./upload_logs.sh
- os: linux
name: static
before_install:
- SKIP=`.travis/check-mergify-merge` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^(docs|spec)/'` && if [[ "$SKIP" = "skip" ]]; then exit 0; fi
- SKIP=`.travis/check-change '^test/'` && if [[ "$SKIP" = "noskip" ]]; then CHECK_RUST=1; fi
install:
- if [[ $CHECK_RUST ]]; then
rustup toolchain install nightly-2018-12-06 || exit 1;
rustup component add rustfmt-preview --toolchain nightly-2018-12-06 || exit 1;
rustup component add clippy-preview --toolchain nightly-2018-12-06 || exit 1;
fi
- nvm install 10
- nvm use 10
- npm install -g yarn
script:
- if [[ $CHECK_RUST ]]; then
cargo +nightly-2018-12-06 fmt -- --check || FAILED=1;
cargo +nightly-2018-12-06 clippy --all --all-targets -- -D warnings || FAILED=1;
fi; test ! $FAILED
- cd test && yarn && yarn lint
- stage: deploy
name: deploy
script: skip
services:
- docker
deploy:
provider: script
script: bash docker_push.sh
on:
branch: docker-build
notifications:
webhooks: https://webhooks.gitter.im/e/71bb03cf9abce5b02c43
cache:
timeout: 1000
cargo: true
directories:
- "$HOME/.rustup"
- "$HOME/.cache/yarn"
- "$TRAVIS_BUILD_DIR/test/node_modules"
before_cache:
- rm -rf $HOME/.cargo/registry
- rm -rf $TRAVIS_BUILD_DIR/target
git:
depth: 50