-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
51 lines (50 loc) · 1.85 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
sudo: required
language: node_js
node_js:
- '9'
services:
- docker
branches:
only:
- develop
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
- /^v[0-9]+\.[0-9]+\.[0-9]+-staging$/
jobs:
include:
- stage: lint
if: branch =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- set -e
- npm link
- npm run lint
- set +e
- stage: test
if: branch =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- set -e
- npm link
- npm run test
- set +e
- stage: coverage
if: branch =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- set -e
- npm run test:coverage
- cat ./coverage/lcov.info | npx coveralls
- set +e
- stage: deploy_staging
if: branch =~ /^v[0-9]+\.[0-9]+\.[0-9]+-staging$/
script:
- set -e
- npm link
- npx truffle migrate --network infura_rinkeby
- npx ghu issue -k "$GITHUB_API_TOKEN" -o pandoraboxchain -r pyrrha-webclient,pyrrha-pynode,pyrrha-boxproxy,pyrrha -t "Staging (!!!) contracts addresses update required" -b "Pandora:$(< ./build/addresses/Pandora.json), PandoraMarket:$(< ./build/addresses/PandoraMarket.json), Pan:$(< ./build/addresses/Pan.json), EconomicController:$(< ./build/addresses/EconomicController.json)"
- set +e
- stage: deploy_prod
if: branch =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- set -e
- npm link
- npx truffle migrate --network infura_rinkeby
- npx ghu issue -k "$GITHUB_API_TOKEN" -o pandoraboxchain -r pyrrha-webclient,pyrrha-pynode,pyrrha-boxproxy,pyrrha -t "Staging (!!!) contracts addresses update required" -b "Pandora:$(< ./build/addresses/Pandora.json), PandoraMarket:$(< ./build/addresses/PandoraMarket.json), Pan:$(< ./build/addresses/Pan.json), EconomicController:$(< ./build/addresses/EconomicController.json)"
- set +e