]>
Commit | Line | Data |
---|---|---|
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 | - 7.1 | |
27 | - nightly | |
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 | # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency | |
41 | - php: hhvm-3.12 | |
42 | sudo: required | |
43 | dist: trusty | |
44 | group: edge | |
45 | env: DB=mysql | |
46 | addons: | |
47 | apt: | |
48 | packages: | |
49 | - mysql-server-5.6 | |
50 | - mysql-client-core-5.6 | |
51 | - mysql-client-5.6 | |
52 | services: | |
53 | - mysql | |
54 | - php: hhvm-3.12 | |
55 | sudo: required | |
56 | dist: trusty | |
57 | group: edge | |
58 | env: DB=sqlite | |
59 | - php: 7.0 | |
60 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild | |
61 | - php: 7.0 | |
62 | env: DB=sqlite ASSETS=build | |
63 | allow_failures: | |
64 | - php: hhvm-3.12 | |
65 | - php: 7.1 | |
66 | - php: nightly | |
67 | ||
68 | # exclude v1 branches | |
69 | branches: | |
70 | except: | |
71 | - legacy | |
72 | ||
73 | before_script: | |
74 | - PHP=$TRAVIS_PHP_VERSION | |
75 | - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | |
76 | # xdebug isn't enable for PHP 7.1 | |
77 | - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi | |
78 | - if [[ $PHP = 5.5 ]]; then composer require "phpunit/phpunit:4.*" --no-update; fi; | |
79 | - composer self-update --no-progress | |
80 | - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; | |
81 | ||
82 | install: | |
83 | - if [[ $ASSETS != nobuild ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi; | |
84 | - if [[ $ASSETS != nobuild ]]; then npm install -g npm@latest; fi; | |
85 | ||
86 | before_install: | |
87 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | |
88 | ||
89 | script: | |
90 | - travis_wait bash install.sh | |
91 | - ant prepare-$DB | |
92 | - phpunit -v | |
93 | - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; | |
94 | - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; |