]>
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 | |
5ecdfcd0 TC |
18 | - node_modules |
19 | - $HOME/.cache/bower | |
20 | - $HOME/.npm | |
3e6b7ea0 | 21 | |
367664ee | 22 | php: |
3e6b7ea0 J |
23 | - 5.5 |
24 | - 5.6 | |
03fb6fde | 25 | - 7.0 |
19738973 | 26 | - nightly |
3e6b7ea0 | 27 | - hhvm |
03fb6fde | 28 | |
5ecdfcd0 TC |
29 | node_js: |
30 | - "5" | |
31 | ||
03fb6fde | 32 | env: |
5ecdfcd0 TC |
33 | - DB=mysql ASSETS=nobuild |
34 | - DB=pgsql ASSETS=nobuild | |
35 | - DB=sqlite ASSETS=nobuild | |
61413889 J |
36 | |
37 | matrix: | |
3e6b7ea0 | 38 | fast_finish: true |
4cb3ef51 JB |
39 | include: |
40 | - php: 7.0 | |
5ecdfcd0 TC |
41 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild |
42 | - php: 7.0 | |
43 | env: DB=sqlite ASSETS=build | |
03fb6fde JB |
44 | exclude: |
45 | - php: hhvm | |
46 | env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency | |
3e6b7ea0 J |
47 | allow_failures: |
48 | - php: hhvm | |
aa6e27cf | 49 | |
fd3fd481 | 50 | # exclude v1 branches |
3d99ce9d | 51 | branches: |
fd3fd481 | 52 | except: |
3320d394 | 53 | - legacy |
3e6b7ea0 | 54 | |
03fb6fde | 55 | before_script: |
3ee1582e JB |
56 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; |
57 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; | |
db4d63fc | 58 | - if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then composer require "phpunit/phpunit:4.*" --no-update; fi; |
3ee1582e | 59 | - composer self-update --no-progress |
bb0efca4 | 60 | - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; |
aa6e27cf | 61 | |
5ecdfcd0 TC |
62 | install: |
63 | - if [[ $ASSETS != nobuild ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi; | |
64 | - if [[ $ASSETS != nobuild ]]; then npm install -g npm@latest; fi; | |
65 | ||
6daadb6c NL |
66 | before_install: |
67 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | |
68 | ||
aa6e27cf | 69 | script: |
5ecdfcd0 | 70 | - travis_wait bash install.sh |
03fb6fde | 71 | - ant prepare-$DB |
23634d5d | 72 | - phpunit -v |
4cb3ef51 | 73 | - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; |
eaec84fc | 74 | - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; |