.travis.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. language: php
  2. php:
  3. - 5.4
  4. - 5.5
  5. - 5.6
  6. - 7.0
  7. - 7.1
  8. - 7.2
  9. - 7.3
  10. install:
  11. # newest version without https://github.com/squizlabs/PHP_CodeSniffer/pull/1404
  12. - composer global require squizlabs/php_codesniffer
  13. script:
  14. - phpenv rehash
  15. - find . -not -path "./lib/JSON.php" -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  16. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  17. - |
  18. if [[ $VALIDATE_STANDARD == yes ]]; then
  19. COMPOSER_BIN=$(composer global config --absolute bin-dir)
  20. $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
  21. fi
  22. - |
  23. if [[ $CHECK_TRANSLATION == yes ]]; then
  24. php cli/check.translation.php -r
  25. fi
  26. env:
  27. - CHECK_TRANSLATION=no VALIDATE_STANDARD=yes
  28. matrix:
  29. fast_finish: true
  30. include:
  31. # PHP 5.3 only runs on Ubuntu 12.04 (precise), not 14.04 (trusty)
  32. - php: "5.3"
  33. dist: precise
  34. - php: "7.2"
  35. env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  36. - language: node_js
  37. node_js:
  38. - "node"
  39. php:
  40. # none
  41. install:
  42. - npm install jshint
  43. script:
  44. - node_modules/jshint/bin/jshint .
  45. allow_failures:
  46. - env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  47. - dist: precise