]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
manage assets through npm
[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 - hhvm
27
28 node_js:
29 - "5"
30
31 env:
32 - DB=mysql ASSETS=nobuild
33 - DB=pgsql ASSETS=nobuild
34 - DB=sqlite ASSETS=nobuild
35
36 matrix:
37 fast_finish: true
38 include:
39 - php: 7.0
40 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild
41 - php: 7.0
42 env: DB=sqlite ASSETS=build
43 exclude:
44 - php: hhvm
45 env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
46 allow_failures:
47 - php: hhvm
48
49 # exclude v1 branches
50 branches:
51 except:
52 - legacy
53
54 before_script:
55 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
56 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
57 - composer self-update --no-progress
58 - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
59
60 install:
61 - if [[ $ASSETS != nobuild ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi;
62 - if [[ $ASSETS != nobuild ]]; then npm install -g npm@latest; fi;
63
64 before_install:
65 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
66
67 script:
68 - travis_wait bash install.sh
69 - ant prepare-$DB
70 - bin/phpunit -v
71 - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
72 - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;