.travis.yml
language: php
git:
depth: 5
matrix:
include:
- php: 7.4
- php: 7.3
env: COVERAGE=on
dist: trusty
- php: 7.3
env: STYLECHECK=on
install:
- composer self-update
- if [[ "$STYLECHECK" != "on" ]]; then composer require phpunit/phpunit:^7 js-phpize/js-phpize-phug:^2 nodejs-php-fallback/coffeescript:^1 nodejs-php-fallback/less:^1 nodejs-php-fallback/uglify:^1 nodejs-php-fallback/stylus:^1 cebe/markdown:^1.1 phug/split --no-update; fi;
- if [[ "$STYLECHECK" = "on" ]]; then composer require squizlabs/php_codesniffer --no-update; fi;
- composer install
- |
if [[ "$STYLECHECK" != "on" ]]; then
mkdir -p tests/Phug && \
vendor/bin/split copy https://github.com/phug-php/phug.git tests/Phug/ --filters=tests/Phug/Extension,tests/Phug/Utils,tests/Phug/AbstractPhugTest.php,tests/Phug/CliTest.php,tests/Phug/CompilerModule.php,tests/Phug/DefaultOptionsTest.php,tests/Phug/ExtensionTest.php,tests/Phug/PluginTest.php,tests/Phug/OptimizerTest.php,tests/Phug/PhugAliasTest.php,tests/Phug/PhugTest.php,tests/Phug/cliBootstrap.php;
vendor/bin/split copy https://github.com/phug-php/phug.git tests/ --filters=tests/errorTemplates,tests/templates,tests/views;
fi;
script:
- if [[ "$STYLECHECK" != "on" && "$COVERAGE" != "on" ]]; then vendor/bin/phpunit; fi;
- if [[ "$COVERAGE" = "on" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml; fi;
- if [[ "$STYLECHECK" = "on" ]]; then vendor/bin/phpcs; fi;
notifications:
slack: phug:nzXFnxhU14RWK2EQSDL0u08z
addons:
code_climate:
repo_token: 4c27d7efe84c820a751151e32eb3850b5238eadf335953720f2e1da7a5633144