]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
Label replaced by a button on the nav search form
[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/.npm
24 - $HOME/.yarn-cache
25
26 php:
27 - 5.6
28 - 7.0
29 - 7.1
30 - 7.2
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 - php: 7.0
45 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
46 allow_failures:
47 - php: 7.2
48 - php: nightly
49
50 # exclude v1 branches
51 branches:
52 except:
53 - legacy
54
55 before_script:
56 - PHP=$TRAVIS_PHP_VERSION
57 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
58 # xdebug isn't enable for PHP 7.1
59 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
60 - composer self-update --no-progress
61 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
62
63 install:
64 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
65 - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
66 - if [[ $ASSETS = build ]]; then yarn install; fi;
67
68 before_install:
69 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
70
71 script:
72 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
73 - echo "travis_fold:start:prepare"
74 - make prepare DB=$DB
75 - echo "travis_fold:end:prepare"
76
77 - echo "travis_fold:start:fixtures"
78 - php bin/console doctrine:fixtures:load --no-interaction --env=test
79 - echo "travis_fold:end:fixtures"
80
81 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
82 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
83 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
84 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
85 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
86 - if [[ $ASSETS = build ]]; then yarn run build:prod; fi;