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