forked from wamp-proto/wamp-xbr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
146 lines (118 loc) · 5.83 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# py3.7/travis: https://github.com/travis-ci/travis-ci/issues/9815#issue-336465122
language: python
python: 3.7
dist: xenial
sudo: true
#services:
# - docker
cache:
directories:
- $HOME/.cache/pip
addons:
apt:
update: true
packages:
# needed for pyenchant, needed for sphinx-spellcheck
- libenchant-dev
- nodejs
- nodejs-dev
- npm
before_install:
- export PATH=$PATH:$HOME/.local/bin
# BUILD_DATE, eg "20180513"
- export BUILD_DATE=`date --utc "+%Y%m%d"`
# XBR_PROTOCOL_VERSION, eg "20.3.1"
- export XBR_PROTOCOL_VERSION=`grep '"version":' ./package.json -m1 | cut -d\" -f4`
# XBR_PROTOCOL_VCS_REF, eg "7b5de7e"
- export XBR_PROTOCOL_VCS_REF=`git --git-dir="./.git" rev-list -n 1 v${XBR_PROTOCOL_VERSION} --abbrev-commit`
- npm install -g google-closure-compiler
- npm install -g node-buffer
- npm install -g browserify
- npm install -g coveralls
- npm install -g nodeunit
# https://github.com/trufflesuite/ganache-cli/issues/593
- npm install -g [email protected]
- which ganache-cli
- ganache-cli --version
- npm install -g truffle
- npm install -g solhint
- npm install -g solidity-coverage
install:
- npm install
- pip install -r requirements.txt
before_script:
- ganache-cli --accounts 15 --defaultBalanceEther 1000 --mnemonic "myth like bonus scare over problem client lizard pioneer submit female collect" --gasLimit 0xfffffffffff --gasPrice 1 --port 1545 --networkId 5777 > /dev/null &
- sleep 5
#- docker-compose up -d ganache
#- docker run -d -p 8545:8545 --name ganache trufflesuite/ganache-cli:v6.9.0 --accounts 15 --defaultBalanceEther 1000 --deterministic --mnemonic "myth like bonus scare over problem client lizard pioneer submit female collect" --gasLimit 0xfffffffffff --gasPrice 1 --port 8545 --networkId 5777 --db /ganache
script:
- tox -c tox.ini -e $TOX_ENV
after_script:
- codecov
# https://blog.travis-ci.com/2017-09-12-build-stages-order-and-conditions
stages:
- test
- name: deploy
if: repo = crossbario/xbr-protocol AND branch = master AND type != pull_request
matrix:
fast_finish: true
include:
- python: "3.7"
env: TOX_ENV=truffle-build
- python: "3.7"
env: TOX_ENV=truffle-test
- python: "3.7"
env: TOX_ENV=solhint
- python: "3.7"
env: TOX_ENV=coverage
- python: "3.7"
env: TOX_ENV=xbr-js
- python: "3.7"
env: TOX_ENV=sphinx
# https://docs.travis-ci.com/user/build-stages/matrix-expansion/
- stage: deploy
python: "3.7"
if: repo = crossbario/xbr-protocol AND branch = master AND type != pull_request
#on:
# repo: crossbario/crossbar
# branch: master
# # tags: true
skip_cleanup: true
provider: script
script: pwd && ls -la && sh .travis-deploy.sh
# It is important to note that jobs do not share storage, as each job runs in a fresh VM or container.
# If your jobs need to share files (e.g., using build artifacts from the “Test” stage for deployment
# in the subsequent “Deploy” stage), you need to use an external storage mechanism such as
# S3 and a remote scp server.
#
# https://docs.travis-ci.com/user/build-stages/#Data-persistence-between-stages-and-jobs
allow_failures:
- python: "3.7"
env: TOX_ENV=coverage
# CI notifications
notifications:
# IRC: chat messages on #crossbar-ci @ freenode
irc:
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
channels:
- "irc.freenode.org#crossbar-ci"
use_notice: false
skip_join: false
# Gitter: activity feed on https://gitter.im/crossbario/ci
webhooks:
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
urls:
# travis encrypt --org --repo crossbario/xbr-protocol "https://webhooks.gitter.im/e/7ef..."
- secure: "Cl2DQqcw3HHaEZ1q5mX5A5FtevcwZnFhq1gESchHygRJAlRDMkek2ErUQkbjrfVtuDXWmF/4A2XqXclUvcl9LqWFHuQlnEI311EZnIAMqLSjw5aP7gC6UQ3UM0efiMhNOE2GW88tfh0TNjWCe+8pMcSLijK7rH2lDsiw0BsDrxixxrnK5BGDALzKOABt8gg+4mustqL+KelfzaJV+B3IgAsSSEmEp1TUo9PpBn2VKmNLzProZGm3tP450DRVJAZ0RPXCy/gcYGYCZfj+rIDHfU+reDINQt+23q20T9AcuTLNZDbZSCa1KG6PwFJvayBtN2PBhGdOp2YnqXzj/E+HVOeG70X1bF2uIMALp8RWTTC7UinrE5zYXM4TX8HAmu8OiHvEAqCCKg3bDGv1gFwFTPoGZdPXLn5k0cezAc5R7kmUZxjLmE4HHeT4rjEib4T7v8R0dLww8Fapt+2uBA6u4y04VQJSxIKWUMzOlc8JdTQNcB5hqbF9YBVYKFe4aSxwXOTbSpsQcCeMqvZyBEoGlvTqOM/DQa5NlFWI6P+Gu6nOTDdnQseQXSgylKgGTNrM5LSSBP7+HthQyyoPOVEU/HLA/2KFGMVGuOSwz9o60TthTFmA+iAWi7xPJ+yhuxCCEJOa9l1CkfnTiXOo/2MDkxT+xhorHNzdRX0EYg+U/Q4="
# Slack: post feed on https://crossbario.slack.com/ in channel #ci
slack:
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
rooms:
# travis encrypt --org --repo crossbario/xbr-protocol "crossbario:FYg..."
- secure: "QTk6U2Vict9BAeFjnz9ddPLl5Xx7HMVC86jsqYx3wUCu9lMgM1yQynoRTKPruXqdJ8luE/Vm8iiMUqehDTbBF9f664m7SZA55WZ84Pi8TjOuDF1KZDiX/MH/OaC8Dl26mc4p8aMrqNHqVH6AiPnsGi8zrSPOcn/WlnN9I4m2kv/xkl3YO+8SsKb2brWeV0NsREGASLDiA3F/0hIm/4gBaWwMdPa11LgDMt5hRopqEVqC+E7nIeOh+UiI5jvUh9/ILyIdTtX1/90lxGR8Xog2fXLJslJOGq/CXvtlk8DICew/yGbdrlWwv7Cb/F6+3P2O85PHDkNeVHW9BgXMdUZoom+6lqoGYsUar5h2j1CY/gVQt+pLdP4BeyhkJ7meqsW63SaoR13Ql8lwFVf2QcYTc6oruF/aeSg8GG4Dpe/kHFV/z9Cpc3Ingu2LdTAcHbzpzwnleguHg9rGeDXXTUc4e1A0TsMhfmbwKtr452wPIgOrtmT3ZeZ3rImwvvLmg672hicuZAMzg1HkUOaAGbGWxUSKJomlfWGbZxRjfMPSkAiQbK1487ImgGieRKxZX3IpPJQ2pZP4w4WMWd56ab9ErJGrhW6w3VviaSP5zj/CcLiNMgC4mCRQLmjntIh9cVPpqlxCCho6EHA731jc+mf8v8huxHiLJ5MInFodldu8XlU="