-
Notifications
You must be signed in to change notification settings - Fork 43
/
.travis.yml
74 lines (72 loc) · 2.68 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
dist: trusty
sudo: required
language: node_js
node_js:
- "8"
addons:
ssh_known_hosts:
- 40.71.224.69
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
deploy_app: &deploy_app
stage: deploy
before_install:
- openssl aes-256-cbc -K $encrypted_a1bc936c4a1a_key -iv $encrypted_a1bc936c4a1a_iv -in ./.travis/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
- sudo apt-get update
- sudo apt-get install -y libusb-1.0-0 libusb-1.0-0-dev libudev-dev
- cp $APP_CONFIG ./src/config/config.js
script:
- CI=false npm run build
deploy:
- provider: script
skip_cleanup: true
script: rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/build/ $LIQUALITY_USER@$LIQUALITY_HOST:$DESTINATION_PATH/
on:
branch: master
- provider: script
skip_cleanup: true
script: rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/build/ $LIQUALITY_USER@$LIQUALITY_HOST:$DESTINATION_PATH-dev/
on:
branch: dev
- provider: script
skip_cleanup: true
script: rsync -r --rsync-path="mkdir -p /var/www/html/it/leep/dev/$TRAVIS_COMMIT/swap$SWAP_DIR_SUFFIX && rsync" --delete-after --quiet $TRAVIS_BUILD_DIR/build/ $LIQUALITY_USER@$LIQUALITY_HOST:/var/www/html/it/leep/dev/$TRAVIS_COMMIT/swap$SWAP_DIR_SUFFIX
on:
all_branches: true
- provider: pages
skip-cleanup: true
github-token: "$GITHUB_TOKEN"
keep-history: false
target-branch: gh-pages
local-dir: "./build"
on:
branch: master
condition: $DEPLOY_GH = 1
jobs:
include:
# -
# stage: test
# before_install:
# - sudo apt-get install -y libusb-1.0-0 libusb-1.0-0-dev libudev-dev
# before_script:
# - npm run lint
# - npm install serve-https@1 -g # serve-https@2 is broken
# - cp ./src/test/integration/environment/config.js ./src/config/config.js
# - CI=false npm run build
# - docker-compose -f ./src/test/integration/environment/docker-compose.yaml up -d
# - nohup serve-https -p 3000 -d ./build/ > srv-output.log &
# - sleep 20 # Wait for environment to be steady (mined bitcoin blocks)
# script:
# - npm run test:integration
- <<: *deploy_app
env:
- REACT_APP_TRAVIS_COMMIT=$TRAVIS_COMMIT APP_CONFIG=./.travis/liquality.io.mainnet.config.js DESTINATION_PATH=/var/www/html/it/leep/swap DEPLOY_GH=1 SWAP_DIR_SUFFIX=
- <<: *deploy_app
env:
- REACT_APP_TRAVIS_COMMIT=$TRAVIS_COMMIT APP_CONFIG=./.travis/liquality.io.testnet.config.js DESTINATION_PATH=/var/www/html/it/leep/swap-testnet SWAP_DIR_SUFFIX=-testnet