mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
dist: xenial
|
|
sudo: required
|
|
language: node_js
|
|
node_js:
|
|
- 14
|
|
|
|
services:
|
|
- docker
|
|
|
|
cache: npm
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
|
|
before_script:
|
|
# CodeClimate test reporter setup
|
|
- 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
|
|
# Barge setup
|
|
- git clone https://github.com/oceanprotocol/barge
|
|
- cd barge
|
|
- export ADDRESS_FILE="${HOME}/.ocean/ocean-contracts/artifacts/address.json"
|
|
- mkdir "${HOME}/.ocean/"
|
|
- mkdir "${HOME}/.ocean/ocean-contracts/"
|
|
- mkdir "${HOME}/.ocean/ocean-contracts/artifacts"
|
|
- touch $ADDRESS_FILE
|
|
- echo "{}" >> $ADDRESS_FILE
|
|
- export AQUARIUS_URI="http://172.15.0.5:5000"
|
|
- export DEPLOY_CONTRACTS="true"
|
|
- export CONTRACTS_VERSION=v0.5.7
|
|
- bash -x start_ocean.sh --no-dashboard 2>&1 > start_ocean.log &
|
|
- cd ..
|
|
- ./scripts/waitforcontracts.sh
|
|
|
|
script:
|
|
- npm test
|
|
- npm run build
|
|
|
|
after_script:
|
|
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.unit.json coverage/unit/lcov.info # Format unit test coverage
|
|
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.integration.json coverage/integration/lcov.info # Format integration test coverage
|
|
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 # Sum both coverage parts into coverage/codeclimate.json
|
|
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json
|
|
|
|
notifications:
|
|
email: false
|
|
|
|
deploy:
|
|
- provider: npm
|
|
email: 'devops@oceanprotocol.com'
|
|
api_key: ${NPM_TOKEN}
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|