.travis.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. language: php
  2. php:
  3. - 5.6
  4. - 7.0
  5. - 7.1
  6. - 7.2
  7. - 7.3
  8. install:
  9. # newest version without https://github.com/squizlabs/PHP_CodeSniffer/pull/1404
  10. - composer global require squizlabs/php_codesniffer
  11. script:
  12. - phpenv rehash
  13. - find . -not -path "./lib/JSON.php" -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  14. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  15. - |
  16. if [[ $VALIDATE_STANDARD == yes ]]; then
  17. COMPOSER_BIN=$(composer global config --absolute bin-dir)
  18. $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
  19. fi
  20. - |
  21. if [[ $CHECK_TRANSLATION == yes ]]; then
  22. php cli/check.translation.php -r
  23. fi
  24. env:
  25. - CHECK_TRANSLATION=no VALIDATE_STANDARD=yes
  26. matrix:
  27. fast_finish: true
  28. include:
  29. # PHP 5.3 only runs on Ubuntu 12.04 (precise), not 14.04 (trusty)
  30. - php: "5.3"
  31. dist: precise
  32. # PHP 5.4 & 5.5 only run on Travis in 14.04 (trusty), not 16.04 (xenial)
  33. - php: "5.4"
  34. dist: trusty
  35. - php: "5.5"
  36. dist: trusty
  37. - php: "7.2"
  38. env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  39. - language: node_js
  40. node_js:
  41. - "node"
  42. php:
  43. # none
  44. env:
  45. - HADOLINT="$HOME/hadolint"
  46. install:
  47. - npm install jshint
  48. - curl -sLo "$HADOLINT" $(curl -s https://api.github.com/repos/hadolint/hadolint/releases/latest?access_token="$GITHUB_TOKEN" | jq -r '.assets | .[] | select(.name=="hadolint-Linux-x86_64") | .browser_download_url') && chmod 700 ${HADOLINT}
  49. script:
  50. - node_modules/jshint/bin/jshint .
  51. - bash tests/shellchecks.sh
  52. - git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"
  53. allow_failures:
  54. - env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  55. - dist: precise