Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ matrix:
- php: nightly
env: PHP_CS_FIXER_IGNORE_ENV=1
fast_finish: true
allow_failures:
- php: nightly

cache:
directories:
- vendor/
- tools/

before_script:
- if [[ "$TRAVIS_PHP_VERSION" != '8.0' ]]; composer install -o -q --no-suggest ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '8.0' ]]; composer install -o -q --no-suggest --no-dev ; fi
- echo $TRAVIS_PHP_VERSION
- php -v
- PHP_VERSION=$(php -r "echo PHP_VERSION;")
- echo $PHP_VERSION
- composer install -o -q --no-suggest
- if [[ "$PHP_VERSION" == '7.3' ]]; then composer install satooshi/php-coveralls ; fi

script:
- make phpcs
- if [[ "$PHP_VERSION" < '8.0' ]]; then make phpstan ; fi
- mkdir -p build/logs
- if [[ "$TRAVIS_PHP_VERSION" == '7.4' ]]; then make test-coverage ; fi
- if [[ "$TRAVIS_PHP_VERSION" != '7.4' ]]; then make test ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then make test-coverage ; fi
- if [[ "$TRAVIS_PHP_VERSION" != '7.3' ]]; then make test ; fi

after_script:
- if [[ "$TRAVIS_PHP_VERSION" == '7.4' ]]; then php vendor/bin/php-coveralls -v ; fi
- if [[ "$TRAVIS_PHP_VERSION" == '7.3' ]]; then php vendor/bin/php-coveralls -v ; fi
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PHPSTAN_LEVEL=5
PHPSTAN_VERSION="0.10.5"
PHPSTAN_VERSION="0.12.25"

tools/php-cs-fixer:
wget --directory-prefix=tools --quiet https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar
Expand All @@ -15,9 +15,11 @@ tools/phpunit:
mv tools/phpunit-7.phar tools/phpunit
chmod +x tools/phpunit

phpcs: tools/php-cs-fixer tools/phpstan
phpcs: tools/php-cs-fixer
composer install --optimize-autoloader --no-dev --no-suggest --quiet
tools/php-cs-fixer fix --dry-run --stop-on-violation -v

phpstan: tools/phpstan
tools/phpstan analyze --level=$(PHPSTAN_LEVEL) --no-progress src/

test: tools/phpunit
Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
"ext-ctype": "*",
"ext-mbstring": "*"
},

"require-dev": {
"ext-json": "*",
"satooshi/php-coveralls": "~2.0"
"ext-json": "*"
},
"autoload": {
"psr-4": {
Expand Down