forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (29 loc) · 1.21 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
34
35
36
37
38
39
40
41
42
dist: precise
language: php
services:
- mysql
php:
- 5.6.19
- 7.0
- 7.1
before_install:
# Create mautictest database
- mysql -e 'CREATE DATABASE mautictest;'
# turn off XDebug
- phpenv config-rm xdebug.ini || return
# install dependencies in parallel
- travis_retry composer global require hirak/prestissimo
# set to test environment for Symfony's commands in post install commands
- export SYMFONY_ENV="test"
# install PHPSTAN for PHP 7+
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.6" ]]; then composer global require phpstan/phpstan-shim:0.8.5; fi
install:
- composer install
script:
# Run PHPUnit
- bin/phpunit -d memory_limit=2048M --bootstrap vendor/autoload.php --configuration app/phpunit.xml.dist --fail-on-warning
# Run PHPSTAN analysis for PHP 7+
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.6" ]]; then ~/.composer/vendor/phpstan/phpstan-shim/phpstan.phar analyse app/bundles/CampaignBundle app/bundles/WebhookBundle app/bundles/LeadBundle; fi
# Check if the code standards weren't broken.
# Run it only on PHP 7.1 which should be the fastest. No need to run it for all PHP versions
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then bin/php-cs-fixer fix -v --dry-run --diff; fi