.travis.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. language: php
  2. jobs:
  3. fast_finish: true
  4. allow_failures:
  5. - name: "Translations"
  6. include:
  7. - name: "PHP 8.0 Syntax, linter and tests"
  8. php: "8.0"
  9. install:
  10. - composer global require squizlabs/php_codesniffer
  11. - composer global require phpunit/phpunit ^9
  12. script:
  13. - phpenv rehash
  14. - find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  15. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  16. - COMPOSER_BIN=$(composer global config --absolute bin-dir)
  17. - $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
  18. - $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
  19. - name: "PHP 7.4 Syntax, linter and tests"
  20. php: "7.4"
  21. install:
  22. - composer global require squizlabs/php_codesniffer
  23. - composer global require phpunit/phpunit ^9
  24. script:
  25. - phpenv rehash
  26. - find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  27. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  28. - COMPOSER_BIN=$(composer global config --absolute bin-dir)
  29. - $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
  30. - $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
  31. - name: "PHP 5.6 Syntax"
  32. php: "5.6"
  33. script:
  34. - phpenv rehash
  35. - find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  36. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  37. - name: "Translations format"
  38. php: "7.4"
  39. script:
  40. - phpenv rehash
  41. - php cli/manipulate.translation.php -a format
  42. - git diff --exit-code
  43. - name: "Translations"
  44. php: "7.4"
  45. script:
  46. - phpenv rehash
  47. - php cli/check.translation.php -r
  48. - name: "Linter JS, CSS, SCSS, Shell and Docker"
  49. language: node_js
  50. node_js:
  51. - "node"
  52. env:
  53. - HADOLINT="$HOME/hadolint"
  54. install:
  55. - npm install --save-dev jshint stylelint stylelint-order stylelint-scss stylelint-config-recommended-scss
  56. - curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ${HADOLINT}
  57. script:
  58. - node_modules/jshint/bin/jshint .
  59. # check SCSS separately
  60. - stylelint --syntax scss "**/*.scss"
  61. - stylelint "**/*.css"
  62. - bash tests/shellchecks.sh
  63. - git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"