-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (59 loc) · 2.57 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
addons:
# postgresql: "9.6"
services:
# - postgresql
matrix:
fast_finish: true
include:
- php: nightly
- php: 7.3
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.5
- php: 5.4
allow_failures:
- php: nightly
- php: 5.5
- php: 5.4
before_install:
- if [ -f /home/travis/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/xdebug.ini ]; then phpenv config-rm xdebug.ini; fi
- for f in $(find . -path './vendor' -prune -o -name \*.php -print) ; do php -l $f ; done # Do this first!
- composer self-update # May help using cache for php packages.
# - ls /home/travis/.phpenv/versions/5.6/etc/conf.d
# - phpenv config-add ~travis.php.ini # name choosen for it to be executed after travis.ini
# - ls /home/travis/.phpenv/versions/5.6/etc/conf.d
#^ Shows the (alphabetical) order used for execution, last executed overrides the parameters
# - psql -c 'create database travis_ci_test;' -U postgres
install:
- composer validate
- if [[ $TRAVIS_PHP_VERSION = '7.1' ]]; then composer require --dev friendsofphp/php-cs-fixer; fi
# - composer install --no-scripts --no-progress --no-suggest
# - cp config/parameters.yml.travis config/parameters.yml
# - composer up --no-progress --no-suggest --optimize-autoloader --apcu-autoloader
- composer install --no-progress --no-suggest --optimize-autoloader --apcu-autoloader
- composer show
before_script:
script:
# - ./vendor/bin/simple-phpunit
# this checks that the source code follows the Symfony Code Syntax rules
- if [[ $TRAVIS_PHP_VERSION = '7.1' ]]; then ./vendor/bin/php-cs-fixer fix --diff --dry-run -vvv --using-cache=no; fi
# this checks that the YAML config files contain no syntax errors
# - ./bin/console lint:yaml config
# - ./bin/console lint:yaml @CodeExplorerBundle
# this checks that the Twig template files contain no syntax errors
# - ./bin/console lint:twig templates @CodeExplorerBundle
# this checks that the XLIFF translations contain no syntax errors
# - ./bin/console lint:xliff templates
# this checks that the application doesn't use dependencies with known security vulnerabilities
# - ./bin/console security:check --end-point=http://security.sensiolabs.org/check_lock
- for f in $(find ./vendor -name \*.php) ; do php -l $f > /dev/null ; done # Should be the last line of install but sometimes long to execute and little can be done for errors found.
# inspirated from
# symfony/symfony-demo
# TODO: https://github.com/doctrine/dbal/blob/v2.5.13/.travis.yml