language: node_js
sudo: false
node_js:
  - "stable"
install:
  - npm install
script:
  - npm test
services:
  - mysql
env:
  - MYSQL_HOST=127.0.0.1 MYSQL_USER=root
before_install:
  - mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
  - mysql -e 'CREATE TABLE IF NOT EXISTS `test`.`test`(`id` INT NOT NULL, PRIMARY KEY (`id`));'
env:
  global:
    - DB_ROOT="root"
    - DB_HOST="127.0.0.1"
    - DB_NAME="test"
    - DB_USER="travis"
    - DB_PASS=""
