]>
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 | directories: | |
15 | - vendor | |
16 | - $HOME/.composer/cache | |
17 | ||
18 | php: | |
19 | - 5.4 | |
20 | - 5.5 | |
21 | - 5.6 | |
22 | - 7.0 | |
23 | - hhvm | |
24 | ||
25 | env: | |
26 | - DB=mysql | |
27 | - DB=pgsql | |
28 | - DB=sqlite | |
29 | ||
30 | matrix: | |
31 | fast_finish: true | |
32 | exclude: | |
33 | - php: hhvm | |
34 | env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency | |
35 | allow_failures: | |
36 | - php: 7.0 | |
37 | - php: hhvm | |
38 | ||
39 | branches: | |
40 | only: | |
41 | - v2 | |
42 | ||
43 | before_script: | |
44 | - composer self-update | |
45 | - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; | |
46 | # disable xdebug since we don't use code-coverage for now | |
47 | - if [[ $TRAVIS_PHP_VERSION != '5.6' && $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then phpenv config-rm xdebug.ini; fi | |
48 | # build coverage only on one build, to speed up results feedbacks | |
49 | # - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover"; else PHPUNIT_FLAGS=""; fi; | |
50 | - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag;' -U postgres; fi; | |
51 | ||
52 | script: | |
53 | - ant prepare-$DB | |
54 | - bin/phpunit --exclude-group command-doctrine -v | |
55 | ||
56 | # after_script: | |
57 | # - | | |
58 | # if [ $TRAVIS_PHP_VERSION = '5.6' ]; then | |
59 | # wget https://scrutinizer-ci.com/ocular.phar | |
60 | # php ocular.phar code-coverage:upload --format=php-clover coverage.clover | |
61 | # fi |