]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
typo and build on test
[github/wallabag/wallabag.git] / .travis.yml
1 language: php
2
3 services:
4 - rabbitmq
5 - redis
6
7 # faster builds on docker-container setup
8 sudo: false
9
10 # used for HHVM
11 addons:
12 apt:
13 packages:
14 - tidy
15
16 # cache vendor dirs
17 cache:
18 apt: true
19 directories:
20 - vendor
21 - $HOME/.composer/cache
22 - node_modules
23 - $HOME/.cache/bower
24 - $HOME/.npm
25
26 php:
27 - 5.5
28 - 5.6
29 - 7.0
30 - 7.1
31 - nightly
32
33 node_js:
34 - "5"
35
36 env:
37 - DB=mysql
38 - DB=pgsql
39 - DB=sqlite
40
41 matrix:
42 fast_finish: true
43 include:
44 # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
45 - php: hhvm-3.12
46 sudo: required
47 dist: trusty
48 group: edge
49 env: DB=mysql
50 addons:
51 apt:
52 packages:
53 - mysql-server-5.6
54 - mysql-client-core-5.6
55 - mysql-client-5.6
56 services:
57 - mysql
58 - php: hhvm-3.12
59 sudo: required
60 dist: trusty
61 group: edge
62 env: DB=sqlite
63 - php: 7.0
64 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
65 allow_failures:
66 - php: hhvm-3.12
67 - php: 7.1
68 - php: nightly
69
70 # exclude v1 branches
71 branches:
72 except:
73 - legacy
74
75 before_script:
76 - PHP=$TRAVIS_PHP_VERSION
77 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
78 # xdebug isn't enable for PHP 7.1
79 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
80 - if [[ $PHP = 5.5 ]]; then composer require "phpunit/phpunit:4.*" --no-update; fi;
81 - composer self-update --no-progress
82 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
83
84 install:
85 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi;
86 - if [[ $ASSETS = build ]]; then npm install -g npm@latest; fi;
87 - if [[ $ASSETS = build ]]; then npm install; fi;
88
89 before_install:
90 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
91
92 script:
93 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
94 - ant prepare-$DB
95 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then phpunit -v ; fi;
96 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
97 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
98 - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi;