2019-04-24 13:31:17 +02:00
|
|
|
dist: xenial
|
2019-06-26 13:42:46 +02:00
|
|
|
sudo: required
|
2019-03-07 14:56:07 +01:00
|
|
|
language: node_js
|
2019-04-24 13:31:17 +02:00
|
|
|
node_js:
|
2019-11-15 01:24:34 +01:00
|
|
|
- '12'
|
2019-03-07 14:56:07 +01:00
|
|
|
|
2019-07-17 16:30:43 +02:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2019-05-17 12:14:02 +02:00
|
|
|
addons:
|
2019-07-31 14:45:08 +02:00
|
|
|
# required for internal Aquarius-Brizo communication
|
|
|
|
# https://docs.travis-ci.com/user/hosts/
|
|
|
|
hosts:
|
|
|
|
- aquarius
|
2019-05-17 12:14:02 +02:00
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
# for Cypress
|
|
|
|
- libgconf-2-4
|
|
|
|
|
2019-06-26 10:55:21 +02:00
|
|
|
env:
|
2019-06-26 11:13:41 +02:00
|
|
|
global:
|
2019-07-17 16:30:43 +02:00
|
|
|
# run E2E tests against local Spree
|
2020-01-15 12:41:55 +01:00
|
|
|
- REACT_APP_OCEAN_NETWORK=spree
|
2019-09-24 12:20:08 +02:00
|
|
|
|
|
|
|
# IPFS client & server config
|
2019-10-14 14:30:31 +02:00
|
|
|
- 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"
|
2019-09-24 12:20:08 +02:00
|
|
|
|
2019-07-18 13:30:10 +02:00
|
|
|
# start Barge with these versions
|
2019-11-21 13:54:49 +01:00
|
|
|
- BRIZO_VERSION=v0.7.2
|
2019-12-06 15:46:47 +01:00
|
|
|
- AQUARIUS_VERSION=v1.0.5
|
2019-11-07 11:19:12 +01:00
|
|
|
- KEEPER_VERSION=v0.12.7
|
2019-12-06 15:46:47 +01:00
|
|
|
- EVENTS_HANDLER_VERSION=v0.3.4
|
2019-07-17 16:30:43 +02:00
|
|
|
- KEEPER_OWNER_ROLE_ADDRESS="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"
|
2019-07-18 18:25:57 +02:00
|
|
|
- FAUCET_TIMESPAN=0
|
2019-06-26 10:55:21 +02:00
|
|
|
|
2019-04-30 12:21:43 +02:00
|
|
|
before_install:
|
|
|
|
- npm install -g npm
|
2019-07-17 15:47:54 +02:00
|
|
|
- npm install -g codacy-coverage
|
2019-06-26 13:42:46 +02:00
|
|
|
# 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
|
2019-04-30 12:21:43 +02:00
|
|
|
|
2019-07-17 16:30:43 +02:00
|
|
|
before_script:
|
2019-09-09 23:58:12 +02:00
|
|
|
- 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
|
2019-07-17 16:30:43 +02:00
|
|
|
- git clone https://github.com/oceanprotocol/barge
|
|
|
|
- cd barge
|
2019-10-08 13:01:42 +02:00
|
|
|
- bash -x start_ocean.sh --no-commons 2>&1 > start_ocean.log &
|
2019-07-17 16:30:43 +02:00
|
|
|
- cd ..
|
|
|
|
|
2019-03-24 02:10:00 +01:00
|
|
|
script:
|
2019-04-01 12:20:42 +02:00
|
|
|
# - ./scripts/install.sh # runs automatically with npm ci
|
2019-06-26 19:39:13 +02:00
|
|
|
# executing `npm test` scripts individually here, so first one failing will exit the build
|
|
|
|
- npm run lint || travis_terminate 1
|
2019-07-18 19:09:59 +02:00
|
|
|
- ./scripts/keeper.sh
|
2019-10-29 14:26:39 +01:00
|
|
|
- ./scripts/test.sh
|
2019-04-30 12:21:43 +02:00
|
|
|
- ./scripts/coverage.sh
|
2019-09-11 00:59:56 +02:00
|
|
|
# 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
|
2019-07-12 14:06:09 +02:00
|
|
|
- npm run test:e2e || travis_terminate 1
|
2019-03-24 02:18:53 +01:00
|
|
|
- ./scripts/build.sh
|
2019-03-07 14:56:07 +01:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
email: false
|
|
|
|
|
2019-05-17 12:14:02 +02:00
|
|
|
cache:
|
|
|
|
npm: true
|
|
|
|
directories:
|
|
|
|
# cache folder with Cypress binary
|
|
|
|
- ~/.cache
|
2019-09-06 14:27:09 +02:00
|
|
|
# deploy:
|
|
|
|
# - provider: script
|
|
|
|
# skip_cleanup: true
|
|
|
|
# script: bash -ex ./scripts/deploy_on_k8s.sh
|
|
|
|
# on:
|
|
|
|
# tags: true
|
|
|
|
# all_branches: true
|