]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
Run tests on an uptodate HHVM
[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
19 php:
20 - 5.5
21 - 5.6
22 - 7.0
23 - 7.1
24 - nightly
25
26 env:
27 - DB=mysql
28 - DB=pgsql
29 - DB=sqlite
30
31 matrix:
32 fast_finish: true
33 include:
34 # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
35 - php: hhvm-3.12
36 sudo: required
37 dist: trusty
38 group: edge
39 env: DB=mysql
40 addons:
41 apt:
42 packages:
43 - mysql-server-5.6
44 - mysql-client-core-5.6
45 - mysql-client-5.6
46 services:
47 - mysql
48 - php: hhvm-3.12
49 sudo: required
50 dist: trusty
51 group: edge
52 env: DB=sqlite
53 - php: 7.0
54 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite
55 allow_failures:
56 - php: hhvm-3.12
57 - php: nightly
58
59 # exclude v1 branches
60 branches:
61 except:
62 - legacy
63
64 before_script:
65 - PHP=$TRAVIS_PHP_VERSION
66 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
67 # xdebug isn't enable for PHP 7.1
68 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
69 - composer self-update --no-progress
70 - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
71
72 before_install:
73 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
74
75 script:
76 - travis_wait composer install --no-interaction --no-progress --prefer-dist -o
77 - ant prepare-$DB
78 - phpunit -v
79 - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
80 - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;