forked from everestminds/mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (73 loc) · 2.22 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
75
76
77
78
79
80
81
82
83
language: node_js
node_js:
- "0.6"
- "0.8"
- "0.10"
- "0.12"
- "1.8"
- "2.5"
- "3.3"
- "4.2.0" # Test timers regression
- "4.8"
- "5.12"
- "6.11"
- "7.10"
- "8.3"
env:
global:
# Necessary to build Node.js 0.6 on Travis CI images
- "CC=gcc-4.6 CXX=g++-4.6"
matrix:
- "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.7"
matrix:
include:
- node_js: "6.11"
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.5"
- node_js: "6.11"
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.6"
- node_js: "6.11"
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=5.5"
- node_js: "6.11"
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.0"
- node_js: "6.11"
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.1"
- node_js: "6.11"
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.2"
dist: trusty
addons:
apt:
packages:
- g++-4.6
sudo: required
services:
- docker
cache:
directories:
- node_modules
before_install:
# Skip updating shrinkwrap / lock
- "npm config set shrinkwrap false"
# Setup Node.js version-specific dependencies
- "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev nyc"
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev nyc"
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint"
# Update Node.js modules
- "test ! -d node_modules || npm prune"
- "test ! -d node_modules || npm rebuild"
# Setup environment
- "export MYSQL_DATABASE=node_mysql"
- "export MYSQL_USER=root"
install:
- "docker run -d --name mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=$MYSQL_DATABASE $DOCKER_MYSQL_TYPE:$DOCKER_MYSQL_VERSION"
- "npm install"
- "docker run --link mysql:db -e CHECK_PORT=3306 -e CHECK_HOST=db giorgos/takis"
before_script:
- "docker --version"
- "docker exec mysql mysql -e 'select version()'"
script:
# Run test script, depending on nyc install
- "test ! -z $(npm -ps ls nyc) || npm test"
- "test -z $(npm -ps ls nyc) || npm run-script test-ci"
- "test -z $(npm -ps ls eslint) || npm run-script lint"
after_script:
- "test -d .nyc_output && npm install coveralls@2 && nyc report --reporter=text-lcov | coveralls"