This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
/
.travis.yml
86 lines (76 loc) · 2.74 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
dist: xenial
sudo: required
language: node_js
node_js:
- '12'
services:
- docker
addons:
# required for internal Aquarius-Brizo communication
# https://docs.travis-ci.com/user/hosts/
hosts:
- aquarius
apt:
packages:
# for Cypress
- libgconf-2-4
env:
global:
# run E2E tests against local Spree
- REACT_APP_NODE_URI="http://localhost:8545"
- REACT_APP_AQUARIUS_URI="http://aquarius:5000"
- REACT_APP_BRIZO_URI="http://localhost:8030"
- REACT_APP_SECRET_STORE_URI="http://localhost:12001"
- REACT_APP_FAUCET_URI="http://localhost:3001"
- REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0"
# IPFS client & server config
- REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"
- REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443"
- IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"
# start Barge with these versions
- BRIZO_VERSION=v0.9.3
- AQUARIUS_VERSION=v1.0.7
- KEEPER_VERSION=v0.13.2
- EVENTS_HANDLER_VERSION=v0.4.5
- KEEPER_OWNER_ROLE_ADDRESS="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"
- FAUCET_TIMESPAN=0
before_install:
- npm install -g npm
# Fixes an issue where the max file watch count is exceeded, triggering ENOSPC
# https://stackoverflow.com/questions/22475849/node-js-error-enospc#32600959
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- git clone https://github.com/oceanprotocol/barge
- cd barge
- bash -x start_ocean.sh --no-commons 2>&1 > start_ocean.log &
- cd ..
script:
# - ./scripts/install.sh # runs automatically with npm ci
# executing `npm test` scripts individually here, so first one failing will exit the build
- npm run lint || travis_terminate 1
- ./scripts/keeper.sh
- ./scripts/test.sh
# Pipe the coverage data to Code Climate
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.client.json client/coverage/lcov.info
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.server.json server/coverage/lcov.info
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi
- npm run test:e2e || travis_terminate 1
- ./scripts/build.sh
notifications:
email: false
cache:
npm: true
directories:
# cache folder with Cypress binary
- ~/.cache
# deploy:
# - provider: script
# skip_cleanup: true
# script: bash -ex ./scripts/deploy_on_k8s.sh
# on:
# tags: true
# all_branches: true