]>
Commit | Line | Data |
---|---|---|
03493be0 | 1 | language: php |
aa6e27cf | 2 | |
e31ee20d | 3 | services: |
865707f9 JB |
4 | - mysql |
5 | - postgresql | |
d470f817 JB |
6 | - rabbitmq |
7 | - redis | |
2d733277 | 8 | |
3e6b7ea0 J |
9 | # cache vendor dirs |
10 | cache: | |
4cb3ef51 | 11 | apt: true |
3e6b7ea0 J |
12 | directories: |
13 | - vendor | |
14 | - $HOME/.composer/cache | |
5ecdfcd0 | 15 | - node_modules |
5ecdfcd0 | 16 | - $HOME/.npm |
c44d13f9 | 17 | - $HOME/.yarn-cache |
3e6b7ea0 | 18 | |
367664ee | 19 | php: |
6dfac457 | 20 | - 7.1 |
9ab45e68 | 21 | - 7.2 |
f168642b | 22 | - 7.3 |
affa6602 | 23 | - 7.4 |
883ccc23 | 24 | - nightly |
03fb6fde | 25 | |
5ecdfcd0 TC |
26 | node_js: |
27 | - "5" | |
28 | ||
03fb6fde | 29 | env: |
40c47f70 JB |
30 | - DB=mysql |
31 | - DB=pgsql | |
32 | - DB=sqlite | |
61413889 J |
33 | |
34 | matrix: | |
3e6b7ea0 | 35 | fast_finish: true |
4cb3ef51 | 36 | include: |
6fc95673 | 37 | - php: 7.2 |
f440e282 | 38 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite |
3e6b7ea0 | 39 | allow_failures: |
affa6602 | 40 | - php: 7.4 |
883ccc23 | 41 | - php: nightly |
aa6e27cf | 42 | |
fd3fd481 | 43 | # exclude v1 branches |
3d99ce9d | 44 | branches: |
fd3fd481 | 45 | except: |
3320d394 | 46 | - legacy |
3e6b7ea0 | 47 | |
5a4cbf5b JB |
48 | before_install: |
49 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | |
50 | ||
51 | install: | |
52 | - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi; | |
53 | - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi; | |
54 | - if [[ $ASSETS = build ]]; then yarn install; fi; | |
55 | ||
03fb6fde | 56 | before_script: |
fc41abb9 | 57 | - PHP=$TRAVIS_PHP_VERSION |
6df8b9c6 JB |
58 | - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini |
59 | - phpenv config-rm xdebug.ini || echo "xdebug not available" | |
3ee1582e | 60 | - composer self-update --no-progress |
1ca9310f JB |
61 | # install imagick |
62 | - pear config-set preferred_state beta | |
63 | - pecl channel-update pecl.php.net | |
64 | - yes | pecl install imagick | |
6daadb6c | 65 | |
aa6e27cf | 66 | script: |
5a4cbf5b | 67 | - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist |
6df8b9c6 | 68 | |
2054740f | 69 | - echo "travis_fold:start:prepare" |
7485a272 | 70 | - make prepare DB=$DB |
e36c85eb | 71 | - echo "travis_fold:end:prepare" |
1f155b29 | 72 | |
6fc95673 | 73 | - make fixtures |
1f155b29 | 74 | |
d0cf488d | 75 | - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi; |
1e0d8ad7 JB |
76 | # PHPStan needs PHPUnit to be installed and cache app to be generated |
77 | - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then php bin/phpstan analyse src tests --no-progress --level 1 ; fi; | |
38520658 | 78 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi; |
40c47f70 | 79 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; |
b6692247 | 80 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; |
4da598c5 | 81 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi; |
4cea76b0 | 82 | - if [[ $ASSETS = build ]]; then yarn run build:prod; fi; |