]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
96510f84bd4c8dd870dec5cb7ce822f42c332949
[github/wallabag/wallabag.git] / .travis.yml
1 language: php
2
3 services:
4 - mysql
5 - postgresql
6 - rabbitmq
7 - redis
8
9 # cache vendor dirs
10 cache:
11 apt: true
12 directories:
13 - vendor
14 - $HOME/.composer/cache
15 - node_modules
16 - $HOME/.npm
17 - $HOME/.yarn-cache
18
19 php:
20 - 7.1
21 - 7.2
22 - 7.3
23 - nightly
24
25 node_js:
26 - "5"
27
28 env:
29 - DB=mysql
30 - DB=pgsql
31 - DB=sqlite
32
33 matrix:
34 fast_finish: true
35 include:
36 - php: 7.2
37 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
38 allow_failures:
39 - php: nightly
40
41 # exclude v1 branches
42 branches:
43 except:
44 - legacy
45
46 before_install:
47 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
48
49 install:
50 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
51 - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
52 - if [[ $ASSETS = build ]]; then yarn install; fi;
53
54 before_script:
55 - PHP=$TRAVIS_PHP_VERSION
56 - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
57 - phpenv config-rm xdebug.ini || echo "xdebug not available"
58 - composer self-update --no-progress
59 # install imagick
60 - pear config-set preferred_state beta
61 - pecl channel-update pecl.php.net
62 - yes | pecl install imagick
63
64 script:
65 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
66
67 - echo "travis_fold:start:prepare"
68 - make prepare DB=$DB
69 - echo "travis_fold:end:prepare"
70
71 - make fixtures
72
73 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then SYMFONY_PHPUNIT_VERSION=6.5 ./bin/simple-phpunit -v ; fi;
74 # PHPStan needs PHPUnit to be installed and cache app to be generated
75 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then php bin/phpstan analyse src tests --no-progress --level 1 ; fi;
76 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
77 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
78 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
79 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
80 - if [[ $ASSETS = build ]]; then yarn run build:prod; fi;