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