1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00
ocean.js/.travis.yml
Jamie Hewitt 89bac18492
re-building package-lock.json with npm v7 (#704)
* re-building package-lock.json with npm v7

* fresh package-lock

* run Travis against Node.js v15

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2021-04-13 13:47:24 +02:00

56 lines
1.8 KiB
YAML

dist: xenial
sudo: required
language: node_js
node_js:
- 15
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"
- if [[ -n "$DOCKERHUB_PASSWORD" && -n "$DOCKERHUB_USERNAME" ]]; then echo "logining in to docker";echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin;fi
- bash -x start_ocean.sh --with-provider2 --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 [[ -n "CC_TEST_REPORTER_ID" && "$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