-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
102 lines (96 loc) · 3.87 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
language: node_js
node_js:
- "8"
services:
- rabbitmq
stages:
- name: test
- name: migrate
if: type != pull_request AND (branch = master OR branch = develop)
jobs:
include:
- stage: test
language: node_js
node_js:
- "8"
before_install:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- npm i npm@latest -g
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
install:
- npm install -g ganache-cli
- npm install
- npm install -g codecov
- export PLAYGROUND_TRLLISTENER=$TRAVIS_BUILD_DIR/../trllistener-dev
- export PROXY_ADDR_PATH=$TRAVIS_BUILD_DIR/../trlProxyAddress.json
- export INTEGRATION_TEST=1
- sh ./scripts/setup-listener-integration.sh
before_script:
- npm run start > ganache-unittest-logs.txt &
- npm run start:testrpc-integration > ganache-integration-logs.txt &
script:
- truffle test
## - npm run migrate-integration
## - npm run test-integration
- truffle migrate --reset
- travis_wait npm run coverage
after_script:
- truffle migrate --reset --network development_integration_test
- cd $TRAVIS_BUILD_DIR
- truffle migrate --reset --compile-all --network development_integration_test
- cd $PLAYGROUND_TRLLISTENER
- npm run test-trl-int
- export INTEGRATION_TEST=0
- echo "Finished small-setup"
- codecov
- stage: migrate
# if: branch = master
language: node_js
node_js:
- "8"
before_install:
- npm i npm@latest -g
- npm install -g npx
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
install:
- npm install
script:
#- truffle migrate --reset --network rinkeby_infura
- truffle migrate --reset --network rinkeby_frontier
- truffle networks > truffle-logs.txt
- npx semantic-release --dry-run --no-ci > semantic-release-logs.txt
- export VAULT_ADDR=$((grep Vault truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export REGISTRY_FACTORY_ADDR=$((grep OwnedRegistryFactory truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export PROXY_ADDR=$((grep Proxy truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export TOKEN_ADDR=$((grep Standard20TokenMock truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export SUBSCRIPTION_ADDR=$((grep Subscription truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export TRL_ADDR=$((grep TRL truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export TRL_VERSION=$(grep "The next release version is" semantic-release-logs.txt | cut -d " " -f11)
- export HELENA_AGENT_ADDR=$((grep helenaAgent truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export BANK_ADDR=$((grep Bank truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- export ALLOWANCE_ADDR=$((grep Allowance truffle-logs.txt | cut -d ":" -f2) | awk '{print $1}')
- cd scripts && node updateContractManager.js && cd ..
- echo "Updated the contract manager"
- echo "- TRL_VERSION"
- echo $TRL_VERSION
- echo "- TRL_ADDR"
- echo $TRL_ADDR
- echo "- SUBSCRIPTION_ADDR"
- echo $SUBSCRIPTION_ADDR
- echo "- TOKEN_ADDR"
- echo $TOKEN_ADDR
- echo "- PROXY_ADDR"
- echo $PROXY_ADDR
- echo "- REGISTRY_FACTORY_ADDR"
- echo $REGISTRY_FACTORY_ADDR
- echo "- VAULT_ADDR"
- echo $VAULT_ADDR
- echo "- HELENA_AGENT_ADDR"
- echo $HELENA_AGENT_ADDR
- echo "- BANK_ADDR"
- echo $BANK_ADDR
- echo "- ALLOWANCE_ADDR"
- echo $ALLOWANCE_ADDR
after_script:
- npx semantic-release