.travis.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. language: php
  2. php:
  3. - 5.6
  4. - 7.3
  5. install:
  6. # newest version without https://github.com/squizlabs/PHP_CodeSniffer/pull/1404
  7. - composer global require squizlabs/php_codesniffer
  8. script:
  9. - phpenv rehash
  10. - find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  11. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  12. - |
  13. if [[ $VALIDATE_STANDARD == yes ]]; then
  14. COMPOSER_BIN=$(composer global config --absolute bin-dir)
  15. $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
  16. fi
  17. - |
  18. if [[ $CHECK_TRANSLATION == yes ]]; then
  19. php cli/check.translation.php -r
  20. fi
  21. env:
  22. - CHECK_TRANSLATION=no VALIDATE_STANDARD=yes
  23. matrix:
  24. fast_finish: true
  25. include:
  26. - php: "7.2"
  27. env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no
  28. - language: node_js
  29. node_js:
  30. - "node"
  31. php:
  32. # none
  33. env:
  34. - HADOLINT="$HOME/hadolint"
  35. install:
  36. - npm install --save-dev jshint stylelint stylelint-order stylelint-scss stylelint-config-recommended-scss
  37. - 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}
  38. script:
  39. - node_modules/jshint/bin/jshint .
  40. # check SCSS separately
  41. - stylelint --syntax scss "**/*.scss"
  42. - stylelint "**/*.css"
  43. - bash tests/shellchecks.sh
  44. - git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"
  45. allow_failures:
  46. - env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no