forked from OpenZeppelin/openzeppelin-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (90 loc) · 4.05 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'
cache:
# Cache all node_modules directories, but not build dirs, since truffle seems to generate
# different artifacts on every run, causing travis to re-generate the cache every time.
# This requires us to run lerna bootstrap on every stage, to rebuild contracts.
directories:
- "$HOME/.npm"
- node_modules
- packages/lib/node_modules
- packages/lib/lib
- packages/cli/node_modules
- packages/cli/lib
- packages/docs/node_modules
- examples/lib-simple/node_modules
- examples/lib-complex/node_modules
- tests/cli-app/node_modules
- tests/cli-app/workdir/node_modules
stages:
- prepare cache
- tests
jobs:
include:
# Install all dependencies and cache them
- stage: prepare cache
script: true
install:
- npm install
- npx lerna bootstrap --loglevel=debug
# Initial stage with lib tests
- stage: tests
name: Lib tests
install: pwd # Override to avoid npm install.
script: npx lerna run test --concurrency=1 --stream=true --scope=zos-lib
# Test stage for CLI on Linux
- stage: tests
name: CLI tests on Linux
os: linux
install: npx lerna run compile-contracts --scope zos-lib
script: npx lerna run test --concurrency=1 --stream=true --scope=zos
# Test stage for CLI on OSX
- stage: tests
name: CLI tests on OSX
os: osx
install:
# Travis is not finding some dependencies when running on OSX, running lerna again here to avoid that
- npx lerna bootstrap --loglevel=debug
script: npx lerna run test --concurrency=1 --stream=true --scope=zos
# Test stage for complex-example
- stage: tests
name: Complex example tests
install: npx lerna run compile-contracts
script: npx lerna run test --concurrency=1 --stream=true --scope=zos-lib-complex-example
# Integration tests on local geth
- stage: tests
name: Local geth node
env: NETWORK=geth-dev
before_install:
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install -y ethereum
install:
# Travis is not finding some dependencies when running the integration tests, running lerna again here to avoid that
- npx lerna bootstrap --loglevel=debug
- npm --prefix tests/cli-app install tests/cli-app
script: cd tests/cli-app && ./scripts/test.sh
# Integration tests on local geth with hdwallet-provider
- stage: tests
name: HDWallet on local geth node
env: NETWORK=geth-dev-hdwallet
before_install:
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install -y ethereum
install:
# Travis is not finding some dependencies when running the integration tests, running lerna again here to avoid that
- npx lerna bootstrap --loglevel=debug
- npm --prefix tests/cli-app install tests/cli-app
script: cd tests/cli-app && ./scripts/test.sh
# Rinkeby integration tests are temporarily disabled
# - stage: integration tests
# name: HDWallet on Infura Rinkeby
# if: false
# install: npx lerna bootstrap --loglevel=debug
# script: cd tests/cli-app && ./scripts/test.sh
# env:
# - NETWORK=rinkeby-infura-hdwallet
# - FROM=0xf0a9ed2663311ce436347bb6f240181ff103ca16
# - secure: "ZsQ+vzUaggGqBe/gLsQ8pM6k0BKRcDncVh6GfCTrn4+xkhnfy4NGeHtpZgI+XcBaGK2YwJFdog2No0SJjM3lVmQMDMK+lb5TyQk3EKqHAxJMew7n0WirNlB77Y53Xb0LGVFJxaQ94Vp6sWuw7OKdfpCqD0SKWdsnqVkXqZnt1L/iSvj/FRqO9UxvXJYBrpOLuSiPP+6B6GG0QjWHXZAOHeRmFUG3FpjBsr7EvHDQrcFGfVA1HxpUXfOyLpsRI6uAdUImBxQWxe7QmketG9lW6PVTZNWd1GkkDW5Ksn9JbiAfpFxUMt78cnyjkViP5o1dWXihAZOnGCAMtO9f4s55/n/3E0tiAMynX42M0j1bSDIbNadKWDHkUcxP2IpVh4PZbaS7BuizP5tI0f2EHWXUmVPmZO1e4155qPQKL/TuxkLNxI3SMLFoeI06Z+3CMMZGuXFCVd3Lq40lZXzTBlWiUh4Dt7loX5MP63j0xSgXbUhoFg4E2RjC8iDUljPS5Qfsww3U+tp58IgwBIejGHs6A8vnCpxfEDj9bhTK6dc9RN4y7GVnjexZM9+7WxShRcqDA6D6zKWtl5wUnH5FuanS5GnZCGKeZHtLuBefJGJLbQRfA0KgdfV1mabtg/+2qko1a0Ys2ebzuJuHOdXrTA2PFUzNTOLC4qm4h3wJqsR7Aww="