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