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