]> git.immae.eu Git - github/wallabag/wallabag.git/blame_incremental - .travis.yml
Merge pull request #2932 from wallabag/mruminski-patch-1
[github/wallabag/wallabag.git] / .travis.yml
... / ...
CommitLineData
1language: php
2
3services:
4 - rabbitmq
5 - redis
6
7# faster builds on docker-container setup
8sudo: false
9
10# used for HHVM
11addons:
12 apt:
13 packages:
14 - tidy
15
16# cache vendor dirs
17cache:
18 apt: true
19 directories:
20 - vendor
21 - $HOME/.composer/cache
22 - node_modules
23 - $HOME/.cache/bower
24 - $HOME/.npm
25
26php:
27 - 5.5
28 - 5.6
29 - 7.0
30 - 7.1
31 - nightly
32
33node_js:
34 - "5"
35
36env:
37 - DB=mysql
38 - DB=pgsql
39 - DB=sqlite
40
41matrix:
42 fast_finish: true
43 include:
44 - php: 7.0
45 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
46 allow_failures:
47 - php: nightly
48
49# exclude v1 branches
50branches:
51 except:
52 - legacy
53
54before_script:
55 - PHP=$TRAVIS_PHP_VERSION
56 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
57 # xdebug isn't enable for PHP 7.1
58 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
59 - composer self-update --no-progress
60 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
61
62install:
63 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.7; fi;
64 - if [[ $ASSETS = build ]]; then npm install -g npm@latest; fi;
65 - if [[ $ASSETS = build ]]; then npm install; fi;
66
67before_install:
68 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
69
70script:
71 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
72 - ant prepare-$DB
73 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
74 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
75 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
76 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
77 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
78 - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi;