]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
229e3e0efa8b41f512d4db87cfaf9f237acf0b7c
[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 - 7.4
24 - nightly
25
26 node_js:
27 - "5"
28
29 env:
30 - DB=mysql
31 - DB=pgsql
32 - DB=sqlite
33
34 matrix:
35 fast_finish: true
36 include:
37 - php: 7.2
38 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
39 allow_failures:
40 - php: 7.4
41 - php: nightly
42
43 # exclude v1 branches
44 branches:
45 except:
46 - legacy
47
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
56 before_script:
57 - PHP=$TRAVIS_PHP_VERSION
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"
60 - composer self-update --no-progress
61 # install imagick
62 - pear config-set preferred_state beta
63 - pecl channel-update pecl.php.net
64 - yes | pecl install imagick
65
66 script:
67 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
68
69 - echo "travis_fold:start:prepare"
70 - make prepare DB=$DB
71 - echo "travis_fold:end:prepare"
72
73 - make fixtures
74
75 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
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;
78 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
79 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
80 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
81 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
82 - if [[ $ASSETS = build ]]; then yarn run build:prod; fi;