Skip to content

Commit

Permalink
feat(tests): move tests into the repo of the driver
Browse files Browse the repository at this point in the history
  • Loading branch information
wzrdtales committed Sep 30, 2016
1 parent 9cac086 commit 1cd2f64
Show file tree
Hide file tree
Showing 8 changed files with 1,002 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ node_modules

# Users Environment Variables
.lock-wscript

test/db.config.json
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
test
48 changes: 48 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
language: node_js

node_js:
- 4
- 5
- 6

notifications:
email:
recipients:
- magic@wizardtales.com
webhooks:
urls:
- https://webhooks.gitter.im/e/509c88551a18006fe93f
on_success: change
on_failure: always
on_start: false

os:
- linux

matrix:
fast_finish: true
allow_failures:
- node_js: 6

sudo: false

cache:
npm: true
directories:
- node_modules

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
mariadb: "10.0"

before_install:
- export CXX=g++-4.8; export CC=gcc-4.8;

before_script:
- mysql -e "create database db_migrate_test;"
- createdb db_migrate_test
- cp test/db.config.ci test/db.config.json
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![Dependency Status](https://david-dm.org/db-migrate/mysql.svg)](https://david-dm.org/db-migrate/mysql)
[![devDependency Status](https://david-dm.org/db-migrate/mysql/dev-status.svg)](https://david-dm.org/db-migrate/mysql#info=devDependencies)


# mysql
db-migrate mysql driver
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "db-migrate mysql driver",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node node_modules/.bin/vows"
},
"repository": {
"type": "git",
Expand All @@ -30,5 +30,10 @@
"db-migrate-base": "^1.2.5",
"moment": "^2.11.2",
"mysql": "^2.10.2"
},
"devDependencies": {
"db-meta": "^0.4.1",
"db-migrate-shared": "^1.1.2",
"vows": "0.8.0"
}
}
21 changes: 21 additions & 0 deletions test/db.config.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"mysql": {
"database": "db_migrate_test",
"user": "root",
"driver": "mysql"
},
"pg": {
"driver": "pg",
"database": "db_migrate_test",
"username": "postgres"
},
"sqlite3": {
"driver": "sqlite3",
"filename": "test.db"
},
"mongodb": {
"driver": "mongodb",
"host": "localhost",
"database": "db_migrate_test"
}
}
20 changes: 20 additions & 0 deletions test/db.config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mysql": {
"database": "db_migrate_test",
"user": "root",
"driver": "mysql"
},
"pg": {
"driver": "pg",
"database": "db_migrate_test"
},
"sqlite3": {
"driver": "sqlite3",
"filename": "test.db"
},
"mongodb": {
"driver": "mongodb",
"host": "localhost",
"database": "db_migrate_test"
}
}
Loading

0 comments on commit 1cd2f64

Please sign in to comment.