forked from mysqljs/mysql
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
92 lines (82 loc) · 2.31 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
84
85
86
87
88
89
90
91
92
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.9"
- "5.12"
- "6.17"
- "7.10"
- "8.17"
- "9.11"
- "10.21"
- "11.15"
- <s "12.18"
- "13.13"
- "14.2"
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: *lts
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.5"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.6"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=8.0"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=5.5"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.0"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.1"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.2"
- node_js: *lts
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.3"
dist: trusty
addons:
apt:
packages:
- g++-4.6
services:
- docker
cache:
directories:
- node_modules
before_install:
# Skip updating shrinkwrap / lock
- "npm config set shrinkwrap false"
# Setup Node.js version-specific dependencies
- "node tool/install-nyc.js --nyc-optional"
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 10 || 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_HOST=localhost"
- "export MYSQL_PORT=$(node tool/free-port.js)"
- "export MYSQL_USER=root"
install:
- "docker run -d --name mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=$MYSQL_DATABASE -p $MYSQL_PORT:3306 $DOCKER_MYSQL_TYPE:$DOCKER_MYSQL_VERSION"
- "npm install"
- "node tool/wait-mysql.js $MYSQL_PORT $MYSQL_HOST"
before_script:
- "docker --version"
- "node tool/mysql-version.js"
script:
# Run test script
- "npm run-script test-ci"
- "npm -ps ls eslint | grep -vq eslint || npm run-script lint"
after_script:
- "test -d .nyc_output && npm install coveralls@2 && nyc report --reporter=text-lcov | coveralls"