.travis.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. language: node_js
  2. node_js:
  3. - "0.6"
  4. - "0.8"
  5. - "0.10"
  6. - "0.12"
  7. - "1.8"
  8. - "2.5"
  9. - "3.3"
  10. - "4.2.0" # Test timers regression
  11. - "4.8"
  12. - "5.12"
  13. - "6.13"
  14. - "7.10"
  15. - "8.10"
  16. - "9.8"
  17. env:
  18. global:
  19. # Necessary to build Node.js 0.6 on Travis CI images
  20. - "CC=gcc-4.6 CXX=g++-4.6"
  21. matrix:
  22. - "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.7"
  23. matrix:
  24. include:
  25. - node_js: "6.13"
  26. env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.5"
  27. - node_js: "6.13"
  28. env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.6"
  29. - node_js: "6.13"
  30. env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=5.5"
  31. - node_js: "6.13"
  32. env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.0"
  33. - node_js: "6.13"
  34. env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.1"
  35. - node_js: "6.13"
  36. env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.2"
  37. - node_js: "6.13"
  38. env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.3"
  39. dist: trusty
  40. addons:
  41. apt:
  42. packages:
  43. - g++-4.6
  44. sudo: required
  45. services:
  46. - docker
  47. cache:
  48. directories:
  49. - node_modules
  50. before_install:
  51. # Skip updating shrinkwrap / lock
  52. - "npm config set shrinkwrap false"
  53. # Setup Node.js version-specific dependencies
  54. - "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev nyc"
  55. - "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev nyc"
  56. - "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint"
  57. # Update Node.js modules
  58. - "test ! -d node_modules || npm prune"
  59. - "test ! -d node_modules || npm rebuild"
  60. # Setup environment
  61. - "export MYSQL_DATABASE=node_mysql"
  62. - "export MYSQL_USER=root"
  63. install:
  64. - "docker run -d --name mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=$MYSQL_DATABASE $DOCKER_MYSQL_TYPE:$DOCKER_MYSQL_VERSION"
  65. - "npm install"
  66. - "docker run --link mysql:db -e CHECK_PORT=3306 -e CHECK_HOST=db giorgos/takis"
  67. before_script:
  68. - "docker --version"
  69. - "docker exec mysql mysql -e 'select version()'"
  70. script:
  71. # Run test script, depending on nyc install
  72. - "test ! -z $(npm -ps ls nyc) || npm test"
  73. - "test -z $(npm -ps ls nyc) || npm run-script test-ci"
  74. - "test -z $(npm -ps ls eslint) || npm run-script lint"
  75. after_script:
  76. - "test -d .nyc_output && npm install coveralls@2 && nyc report --reporter=text-lcov | coveralls"