]>
Commit | Line | Data |
---|---|---|
03493be0 | 1 | language: php |
aa6e27cf | 2 | |
e31ee20d NL |
3 | services: |
4 | - rabbitmq | |
7230e4c3 | 5 | - redis |
e31ee20d | 6 | |
3e6b7ea0 | 7 | # faster builds on docker-container setup |
81375151 | 8 | sudo: required |
2d733277 | 9 | |
fef41241 JB |
10 | # used for HHVM |
11 | addons: | |
12 | apt: | |
13 | packages: | |
14 | - tidy | |
81375151 | 15 | postgresql: 9.5 |
fef41241 | 16 | |
3e6b7ea0 J |
17 | # cache vendor dirs |
18 | cache: | |
4cb3ef51 | 19 | apt: true |
3e6b7ea0 J |
20 | directories: |
21 | - vendor | |
22 | - $HOME/.composer/cache | |
5ecdfcd0 TC |
23 | - node_modules |
24 | - $HOME/.cache/bower | |
25 | - $HOME/.npm | |
3e6b7ea0 | 26 | |
367664ee | 27 | php: |
3e6b7ea0 J |
28 | - 5.5 |
29 | - 5.6 | |
03fb6fde | 30 | - 7.0 |
6dfac457 | 31 | - 7.1 |
19738973 | 32 | - nightly |
03fb6fde | 33 | |
5ecdfcd0 TC |
34 | node_js: |
35 | - "5" | |
36 | ||
03fb6fde | 37 | env: |
40c47f70 JB |
38 | - DB=mysql |
39 | - DB=pgsql | |
40 | - DB=sqlite | |
61413889 J |
41 | |
42 | matrix: | |
3e6b7ea0 | 43 | fast_finish: true |
4cb3ef51 JB |
44 | include: |
45 | - php: 7.0 | |
f440e282 | 46 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite |
3e6b7ea0 | 47 | allow_failures: |
ddb49dd9 | 48 | - php: 7.1 |
6dfac457 | 49 | - php: nightly |
aa6e27cf | 50 | |
fd3fd481 | 51 | # exclude v1 branches |
3d99ce9d | 52 | branches: |
fd3fd481 | 53 | except: |
3320d394 | 54 | - legacy |
3e6b7ea0 | 55 | |
03fb6fde | 56 | before_script: |
fc41abb9 JB |
57 | - PHP=$TRAVIS_PHP_VERSION |
58 | - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | |
6dfac457 | 59 | # xdebug isn't enable for PHP 7.1 |
fc41abb9 | 60 | - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi |
3ee1582e | 61 | - composer self-update --no-progress |
40c47f70 | 62 | - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; |
81375151 | 63 | - if [[ $DB = pgsql ]]; then psql -U postgres wallabag_test -c 'create extension "uuid-ossp";'; fi; |
aa6e27cf | 64 | |
5ecdfcd0 | 65 | install: |
3c00779d | 66 | - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.7; fi; |
40c47f70 | 67 | - if [[ $ASSETS = build ]]; then npm install -g npm@latest; fi; |
ca8f9bdc | 68 | - if [[ $ASSETS = build ]]; then npm install; fi; |
5ecdfcd0 | 69 | |
6daadb6c NL |
70 | before_install: |
71 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | |
72 | ||
aa6e27cf | 73 | script: |
5759c9aa | 74 | - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist |
03fb6fde | 75 | - ant prepare-$DB |
202a66ce | 76 | - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi; |
40c47f70 JB |
77 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; |
78 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; | |
b6692247 | 79 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; |
4da598c5 | 80 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi; |
9f7d154e | 81 | - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi; |