.travis.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 . -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: "7.2"
  30. env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  31. - language: node_js
  32. node_js:
  33. - "node"
  34. php:
  35. # none
  36. env:
  37. - HADOLINT="$HOME/hadolint"
  38. install:
  39. - npm install --save-dev jshint stylelint stylelint-order stylelint-scss stylelint-config-recommended-scss
  40. - 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}
  41. script:
  42. - node_modules/jshint/bin/jshint .
  43. # check SCSS separately
  44. - stylelint --syntax scss "**/*.scss"
  45. - stylelint "**/*.css"
  46. - bash tests/shellchecks.sh
  47. - git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"
  48. allow_failures:
  49. - env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  50. - dist: precise