Skip to content

Commit 74afe14

Browse files
committed
build: add AppVeyor
1 parent 1ca85d1 commit 74afe14

File tree

4 files changed

+40
-5
lines changed

4 files changed

+40
-5
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ before_script:
1212

1313
script:
1414
- "test $TRAVIS_NODE_VERSION != '0.6' || npm test"
15-
- "test $TRAVIS_NODE_VERSION = '0.6' || npm run-script test-travis"
15+
- "test $TRAVIS_NODE_VERSION = '0.6' || npm run-script test-ci"
1616

1717
after_script:
1818
- "test $TRAVIS_NODE_VERSION = '0.6' || npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"

Readme.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
[![NPM Version][npm-image]][npm-url]
44
[![NPM Downloads][downloads-image]][downloads-url]
55
[![Node.js Version][node-version-image]][node-version-url]
6-
[![Build Status][travis-image]][travis-url]
6+
[![Linux Build][travis-image]][travis-url]
7+
[![Windows Build][appveyor-image]][appveyor-url]
78
[![Test Coverage][coveralls-image]][coveralls-url]
89

910
## Table of Contents
@@ -1255,8 +1256,10 @@ $ MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_DATABASE=node_mysql_test MYSQL_USER
12551256
[npm-url]: https://npmjs.org/package/mysql
12561257
[node-version-image]: http://img.shields.io/node/v/mysql.svg
12571258
[node-version-url]: http://nodejs.org/download/
1258-
[travis-image]: https://img.shields.io/travis/felixge/node-mysql/master.svg
1259+
[travis-image]: https://img.shields.io/travis/felixge/node-mysql/master.svg?label=linux
12591260
[travis-url]: https://travis-ci.org/felixge/node-mysql
1261+
[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/node-mysql/master.svg?label=windows
1262+
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/node-mysql
12601263
[coveralls-image]: https://img.shields.io/coveralls/felixge/node-mysql/master.svg
12611264
[coveralls-url]: https://coveralls.io/r/felixge/node-mysql?branch=master
12621265
[downloads-image]: https://img.shields.io/npm/dm/mysql.svg

appveyor.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
environment:
2+
MYSQL_DATABASE: node_mysql
3+
MYSQL_HOST: localhost
4+
MYSQL_USER: root
5+
MYSQL_PASSWORD: Password12!
6+
MYSQL_PATH: C:\Program Files\MySQL\MySQL Server 5.6
7+
8+
matrix:
9+
- nodejs_version: "0.8"
10+
- nodejs_version: "0.10"
11+
- nodejs_version: "0.12"
12+
13+
services:
14+
- mysql
15+
16+
install:
17+
- ps: Install-Product node $env:nodejs_version
18+
- npm install
19+
20+
build: off
21+
22+
before_test:
23+
- SET PATH=%MYSQL_PATH%\bin;%PATH%
24+
- mysqladmin --host=%MYSQL_HOST% --user=%MYSQL_USER% --password=%MYSQL_PASSWORD% create %MYSQL_DATABASE%
25+
26+
test_script:
27+
- mysql --version
28+
- node --version
29+
- npm --version
30+
- npm run test-ci
31+
32+
version: "{build}"

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"scripts": {
3030
"test": "node test/run.js",
31-
"test-cov": "node test/run-cov.js",
32-
"test-travis": "node test/run-cov.js lcovonly"
31+
"test-ci": "node test/run-cov.js lcovonly",
32+
"test-cov": "node test/run-cov.js"
3333
}
3434
}

0 commit comments

Comments
 (0)