]> git.immae.eu Git - github/wallabag/wallabag.git/blame - .travis.yml
Jump to 2.3.6-dev and update release process
[github/wallabag/wallabag.git] / .travis.yml
CommitLineData
03493be0 1language: php
aa6e27cf 2
e31ee20d 3services:
d470f817
JB
4 - rabbitmq
5 - redis
2d733277 6
fef41241
JB
7# used for HHVM
8addons:
d470f817
JB
9 apt:
10 packages:
11 - tidy
fef41241 12
3e6b7ea0
J
13# cache vendor dirs
14cache:
4cb3ef51 15 apt: true
3e6b7ea0
J
16 directories:
17 - vendor
18 - $HOME/.composer/cache
5ecdfcd0 19 - node_modules
5ecdfcd0 20 - $HOME/.npm
c44d13f9 21 - $HOME/.yarn-cache
3e6b7ea0 22
367664ee 23php:
3e6b7ea0 24 - 5.6
03fb6fde 25 - 7.0
6dfac457 26 - 7.1
9ab45e68 27 - 7.2
19738973 28 - nightly
03fb6fde 29
5ecdfcd0
TC
30node_js:
31 - "5"
32
03fb6fde 33env:
40c47f70
JB
34 - DB=mysql
35 - DB=pgsql
36 - DB=sqlite
61413889
J
37
38matrix:
3e6b7ea0 39 fast_finish: true
4cb3ef51
JB
40 include:
41 - php: 7.0
f440e282 42 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
3e6b7ea0 43 allow_failures:
6dfac457 44 - php: nightly
aa6e27cf 45
fd3fd481 46# exclude v1 branches
3d99ce9d 47branches:
fd3fd481 48 except:
3320d394 49 - legacy
3e6b7ea0 50
5a4cbf5b
JB
51before_install:
52 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
53
54install:
55 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
56 - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
57 - if [[ $ASSETS = build ]]; then yarn install; fi;
58
03fb6fde 59before_script:
fc41abb9
JB
60 - PHP=$TRAVIS_PHP_VERSION
61 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
6dfac457 62 # xdebug isn't enable for PHP 7.1
fc41abb9 63 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
3ee1582e 64 - composer self-update --no-progress
40c47f70 65 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
5a4cbf5b
JB
66 # increase swap to avoid "proc_open(): fork failed - Cannot allocate memory"
67 # this should be removed when no more PHP 5 build will be defined
68 - sudo swapon -s
69 - sudo fallocate -l 4G /swapfile
70 - sudo chmod 600 /swapfile
71 - sudo mkswap /swapfile
72 - sudo swapon /swapfile
73 - sudo swapon -s
6daadb6c 74
aa6e27cf 75script:
5a4cbf5b 76 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
2054740f 77 - echo "travis_fold:start:prepare"
8bde7de1 78 - make prepare DB=$DB
e36c85eb 79 - echo "travis_fold:end:prepare"
1f155b29 80
1f155b29
JB
81 - echo "travis_fold:start:fixtures"
82 - php bin/console doctrine:fixtures:load --no-interaction --env=test
83 - echo "travis_fold:end:fixtures"
84
202a66ce 85 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
38520658 86 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
40c47f70 87 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
b6692247 88 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
4da598c5 89 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
4cea76b0 90 - if [[ $ASSETS = build ]]; then yarn run build:prod; fi;