-
Notifications
You must be signed in to change notification settings - Fork 209
/
.travis.yml
182 lines (174 loc) · 5.89 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
language: generic
sudo: required
cache:
timeout: 600
directories:
- $TRAVIS_BUILD_DIR/target/debug
- /opt/.cargo/git
- /opt/.cargo/registry
services:
- docker
git:
depth: 1
stages:
- CheckShell
- Release
- IntegrateTest
before_install:
- docker pull cita/cita-build:ubuntu-18.04-20200606
jobs:
include:
- stage: CheckShell
script:
# Fail if any of these files have warnings
- shellcheck scripts/*.sh env.sh
- stage: Release
name: Release for Integrate Test
language: node_js
node_js:
# - lts/*
- 8.10.0
cache:
directories:
- $TRAVIS_BUILD_DIR/target/release-cache
env: HASH_ALGO=sha3hash CRYPTO_ALGO=secp256k1
before_script:
- cd $TRAVIS_BUILD_DIR
- ./scripts/replace_default_feature.sh ./ sha3hash ${HASH_ALGO}
- ./scripts/replace_default_feature.sh ./ secp256k1 ${CRYPTO_ALGO}
script: ./env.sh make release
before_cache:
- cd $TRAVIS_BUILD_DIR
- rm -rf target/release-cache
- mv -vf target/install target/release-cache
- &stage-contract-test-sha3-secp256k1
stage: IntegrateTest
name: Unit Group
language: node_js
node_js:
# - lts/*
- 8.10.0
cache:
directories:
- $TRAVIS_BUILD_DIR/target/release-cache
env: HASH_ALGO=sha3hash CRYPTO_ALGO=secp256k1
before_install:
- cd $TRAVIS_BUILD_DIR
- rm -rf target/install
- cp -rv target/release-cache target/install
install:
- rm -rf /opt/cita-run/test-chain
- cd $TRAVIS_BUILD_DIR/target/install
- ./bin/cita create
--nodes "127.0.0.1:4100"
--super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523"
- ./bin/cita setup test-chain/0
- ./bin/cita start test-chain/0
before_script:
- cd $TRAVIS_BUILD_DIR/target/install/scripts/contracts/tests
- travis_retry yarn install
script: npm run-script unit_group
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Permission
script: npm run-script unit_permission
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Auth
script: npm run-script unit_auth
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Chain
script: npm run-script unit_chain
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Group Management
script: npm run-script unit_gm
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Permission Management
script: npm run-script unit_pm
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Role Management
script: npm run-script unit_rm
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Quota Management
script: npm run-script unit_qm
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Quota
script: npm run-script unit_quota
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Abi
script: npm run-script abi
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Admin
script: npm run-script unit_admin
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Store
script: npm run-script store
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Batch Tx
script: npm run-script batch_tx
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Uint8
script: npm run-script uint8
- <<: *stage-contract-test-sha3-secp256k1
name: Unit VersionManager
script: npm run-script unit_vm
- <<: *stage-contract-test-sha3-secp256k1
name: Unit Node
install:
- cd $TRAVIS_BUILD_DIR/target/install
- ./bin/cita create
--nodes "127.0.0.1:4000,127.0.0.1:4001,127.0.0.1:4002"
--super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523"
- for i in {0..2} ; do
./bin/cita setup test-chain/$i
&& ./bin/cita start test-chain/$i ;
done
script:
- npm run-script unit_node
- <<: *stage-contract-test-sha3-secp256k1
name: Integrate Quota
install:
- cd $TRAVIS_BUILD_DIR/target/install
- ./bin/cita create
--nodes "127.0.0.1:4100"
--contract_arguments "SysConfig.checkQuota=true"
--super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523"
- ./bin/cita setup test-chain/0
- ./bin/cita start test-chain/0
script:
- npm run-script integrate_quota
- <<: *stage-contract-test-sha3-secp256k1
name: Integrate Permission
install:
- cd $TRAVIS_BUILD_DIR/target/install
- ./bin/cita create
--nodes "127.0.0.1:4100"
--contract_arguments "SysConfig.checkCallPermission=true"
--super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523"
- ./bin/cita setup test-chain/0
- ./bin/cita start test-chain/0
script:
- npm run-script permission
- <<: *stage-contract-test-sha3-secp256k1
name: Integrate AutoExec
install:
- cd $TRAVIS_BUILD_DIR/target/install
- ./bin/cita create
--nodes "127.0.0.1:4100"
--contract_arguments "SysConfig.autoExec=true"
--super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523"
- ./bin/cita setup test-chain/0
- ./bin/cita start test-chain/0
script:
- npm run-script auto_exec
- <<: *stage-contract-test-sha3-secp256k1
name: Integrate Lifetime
install:
- cd $TRAVIS_BUILD_DIR/target/install
- ./bin/cita create
--nodes "127.0.0.1:4100"
--contract_arguments "SysConfig.economicalModel=1 PriceManager.quotaPrice=1"
--super_admin "0x4b5ae4567ad5d9fb92bc9afd6a657e6fa13a2523"
--init_token 0x1000000
- ./bin/cita setup test-chain/0
- ./bin/cita start test-chain/0
script:
- npm run-script lifetime