.travis.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.8"
  11. - "5.12"
  12. - "6.13"
  13. - "7.10"
  14. - "8.9"
  15. - "9.6"
  16. sudo: false
  17. dist: precise
  18. cache:
  19. directories:
  20. - node_modules
  21. before_install:
  22. # Skip updating shrinkwrap / lock
  23. - "npm config set shrinkwrap false"
  24. # Remove all non-test dependencies
  25. - "npm rm --save-dev benchmark beautify-benchmark"
  26. # Setup Node.js version-specific dependencies
  27. - "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev nyc"
  28. - "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev nyc"
  29. - "test $(echo $TRAVIS_NODE_VERSION | cut -d'.' -f1) -ge 4 || npm rm --save-dev eslint eslint-plugin-markdown"
  30. # Update Node.js modules
  31. - "test ! -d node_modules || npm prune"
  32. - "test ! -d node_modules || npm rebuild"
  33. script:
  34. # Run test script, depending on nyc install
  35. - "test ! -z $(npm -ps ls nyc) || npm test"
  36. - "test -z $(npm -ps ls nyc) || npm run-script test-ci"
  37. # Run linter
  38. - "test -z $(npm -ps ls eslint) || npm run-script lint"
  39. after_script:
  40. - "test -d .nyc_output && npm install coveralls@2 && nyc report --reporter=text-lcov | coveralls"