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