]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
Merge remote-tracking branch 'origin/master' into 2.1
[github/wallabag/wallabag.git] / .travis.yml
1 language: php
2
3 # faster builds on docker-container setup
4 sudo: false
5
6 # used for HHVM
7 addons:
8 apt:
9 packages:
10 - tidy
11
12 # cache vendor dirs
13 cache:
14 apt: true
15 directories:
16 - vendor
17 - $HOME/.composer/cache
18 - node_modules
19 - $HOME/.cache/bower
20 - $HOME/.npm
21
22 php:
23 - 5.5
24 - 5.6
25 - 7.0
26 - nightly
27 - hhvm
28
29 node_js:
30 - "5"
31
32 env:
33 - DB=mysql ASSETS=nobuild
34 - DB=pgsql ASSETS=nobuild
35 - DB=sqlite ASSETS=nobuild
36
37 matrix:
38 fast_finish: true
39 include:
40 - php: 7.0
41 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild
42 - php: 7.0
43 env: DB=sqlite ASSETS=build
44 exclude:
45 - php: hhvm
46 env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
47 allow_failures:
48 - php: hhvm
49
50 # exclude v1 branches
51 branches:
52 except:
53 - legacy
54
55 before_script:
56 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
57 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
58 - composer self-update --no-progress
59 - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
60
61 install:
62 - if [[ $ASSETS != nobuild ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi;
63 - if [[ $ASSETS != nobuild ]]; then npm install -g npm@latest; fi;
64
65 before_install:
66 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
67
68 script:
69 - travis_wait bash install.sh
70 - ant prepare-$DB
71 - phpunit -v
72 - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
73 - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;