forked from db-migrate/node-db-migrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (29 loc) · 1.36 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
language: node_js
node_js:
- 0.10
- 0.12
- io.js
notifications:
email:
recipients:
services:
- mongodb
env:
- DB=mysql
- DB=mariadb
- DB=postgres92
- DB=postgres93
before_script:
- until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get install python-software-properties; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main'; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get update; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get purge mysql*; fi"
- sh -c "if [ '$DB' = 'mariadb' ]; then sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install mariadb-server-10.0 -y; fi"
- sh -c "if [ '$DB' = 'postgres92' ]; then sudo /etc/init.d/postgresql stop && sudo /etc/init.d/postgresql start 9.2; fi"
- sh -c "if [ '$DB' = 'postgres93' ]; then sudo /etc/init.d/postgresql stop && sudo /etc/init.d/postgresql start 9.3; fi"
- mysql -e "create database db_migrate_test;"
- createdb db_migrate_test
- cp test/db.config.ci test/db.config.json