.travis.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 . -p -s
  19. - name: "PHP 5.6 Syntax"
  20. php: "5.6"
  21. script:
  22. - phpenv rehash
  23. - find . -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
  24. - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
  25. - name: "Translations format"
  26. php: "7.4"
  27. script:
  28. - phpenv rehash
  29. - php cli/manipulate.translation.php -a format
  30. - git diff --exit-code
  31. - name: "Translations"
  32. php: "7.4"
  33. script:
  34. - phpenv rehash
  35. - php cli/check.translation.php -r
  36. - name: "Linter JS, CSS, SCSS, Shell and Docker"
  37. language: node_js
  38. node_js:
  39. - "node"
  40. env:
  41. - HADOLINT="$HOME/hadolint"
  42. install:
  43. - npm install --save-dev jshint stylelint stylelint-order stylelint-scss stylelint-config-recommended-scss
  44. - curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ${HADOLINT}
  45. script:
  46. - node_modules/jshint/bin/jshint .
  47. # check SCSS separately
  48. - stylelint --syntax scss "**/*.scss"
  49. - stylelint "**/*.css"
  50. - bash tests/shellchecks.sh
  51. - git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT"