-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy path.travis.yml
71 lines (61 loc) · 2.38 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
language: node_js
services:
- postgresql
- mysql
sudo: required
addons:
postgresql: '9.4'
apt:
sources:
- heroku
- mysql-5.7-trusty
packages:
- heroku-toolbelt
- mysql-server
- mysql-client
matrix:
include:
- node_js: '6'
env: DB_TYPE=mysql
- node_js: '8'
env: DB_TYPE=mysql
- node_js: 'stable'
env: DB_TYPE=mysql
- node_js: '6'
env: DB_TYPE=pg
- node_js: '8'
env: DB_TYPE=pg
- node_js: 'stable'
env: DB_TYPE=pg SHOULD_DEPLOY=true
before_install:
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade
- echo "[mysqld]" > $HOME/.my.cnf
- echo "lower-case-table-names = 1" >> $HOME/.my.cnf
- mysql_config_editor set --login-path=client --host=localhost --user=root
- sudo service mysql restart
install:
- if [ "$DB_TYPE" == "sqlite" ]; then npm install --no-shrinkwrap --no-optional; else npm install --no-shrinkwrap; fi
before_script:
- ./scripts/ci/setup-db.sh
script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- echo "TRAVIS_NODE_VERSION=$TRAVIS_NODE_VERSION"
- echo "SHOULD_DEPLOY=$SHOULD_DEPLOY"
- npm test
deploy:
skip_cleanup: true
provider: heroku
api_key:
secure: V2Qerq2HW1rwhJ76O8e5VZ5PRECQBxTT+bEtXikA8mioXkvNUYC5rPDcF46KbQg6rGy3gsTk2iUFkmNRFAiZgnHfub2ViM2OptdJhlGHxzTEDxSe5Ny8HLhFXH0KO9CvJbmRfUGUwXGgaaULX4EFOH2FLGadO184J3AnhPNj10+3FW/KPcthQN4rozRVUBOeI1kmOTifB4eO+XZEdkLRn7g7apzy+FIkZFcUSYaDQcBGUb9l/SYxb2Pd5xMx2SG8lW3SasGD0ZN/XGFo75cyyz42w1u7r4h5/tltn6RpKLzmA9YEi9V6zMTT9LNU/kSh6ylWndE0U2yBMzAJZ5jkwBLpQPlTNz3JWNUZTYNpR/S+rjSBglLN3InTxvKO4ebdz1vzNArk7LzjC3jNBvYl3+kfOSoybS7kAXb/cdXT+EqMqCWWU3F+cuDS1IxUaLdXTci7/BUnmTHQGfdH3Pu/Ha2SPEPSbGwusU+lUYdHxsasvcGtCtn7o9shctZUysNP+SVL7Mp3+reP927wgGt6uGLeRDLd6K7sXxZ11AzMiO+o30hjDCVWKCG/vCSsLB8uGnQJzSqo2ESRbxO0m9Mh5ANrt078mR+/A0UPIUlZd6fTUX3swc6UP+RcUquXs8WQ5icDfMXfn3+r+BUAzsOvJwUDHvsH/rvai7Y3P5doNbg=
app: damp-oasis-38940
on:
repo: mike-works/sql-fundamentals
branch: solutions-pro
condition: $SHOULD_DEPLOY
after_success:
- npm run travis-deploy-once "npm run semantic-release"
branches:
except:
- /^v\d+\.\d+\.\d+$/