-
Notifications
You must be signed in to change notification settings - Fork 72
/
.travis.yml
33 lines (28 loc) · 1.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
sudo: false
language: php
install:
- composer validate
- composer install
matrix:
fast_finish: true
jobs:
include:
- stage: lint
php: 7.1
install:
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer require "phpstan/phpstan" "friendsofphp/php-cs-fixer:^2.8"
# dependencies for phpstan
- composer require --dev "symfony/symfony" "laravel/framework" "drupal/drupal"
script:
# Unit test
- ./vendor/bin/phpunit
# Static analyzer check
- ./vendor/bin/phpstan analyze -c .phpstan.neon --level=4 --no-progress Bootstraps Bridges Laravel
# Check the code style
- IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS
- ./vendor/bin/php-cs-fixer fix --config=.php_cs.php -v --dry-run --diff --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"
# Cache package sources
cache:
directories:
- $HOME/.composer/cache