]>
Commit | Line | Data |
---|---|---|
1 | language: php | |
2 | ||
3 | # faster builds on docker-container setup | |
4 | sudo: false | |
5 | ||
6 | # used for HHVM | |
7 | addons: | |
8 | apt: | |
9 | packages: | |
10 | - tidy | |
11 | ||
12 | # cache vendor dirs | |
13 | cache: | |
14 | apt: true | |
15 | directories: | |
16 | - vendor | |
17 | - $HOME/.composer/cache | |
18 | ||
19 | php: | |
20 | - 5.5 | |
21 | - 5.6 | |
22 | - 7.0 | |
23 | - 7.1 | |
24 | - nightly | |
25 | - hhvm | |
26 | ||
27 | env: | |
28 | - DB=mysql | |
29 | - DB=pgsql | |
30 | - DB=sqlite | |
31 | ||
32 | matrix: | |
33 | fast_finish: true | |
34 | include: | |
35 | - php: 7.0 | |
36 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite | |
37 | exclude: | |
38 | - php: hhvm | |
39 | env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency | |
40 | allow_failures: | |
41 | - php: hhvm | |
42 | - php: nightly | |
43 | ||
44 | # exclude v1 branches | |
45 | branches: | |
46 | except: | |
47 | - legacy | |
48 | ||
49 | before_script: | |
50 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | |
51 | # xdebug isn't enable for PHP 7.1 | |
52 | - if [[ $TRAVIS_PHP_VERSION != '7.1' && $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-rm xdebug.ini; fi | |
53 | - composer self-update --no-progress | |
54 | - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; | |
55 | ||
56 | before_install: | |
57 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | |
58 | ||
59 | script: | |
60 | - travis_wait composer install --no-interaction --no-progress --prefer-dist -o | |
61 | - ant prepare-$DB | |
62 | - phpunit -v | |
63 | - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; | |
64 | - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; |