]>
Commit | Line | Data |
---|---|---|
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.6 | |
28 | - 7.0 | |
29 | - 7.1 | |
30 | - nightly | |
31 | ||
32 | node_js: | |
33 | - "5" | |
34 | ||
35 | env: | |
36 | - DB=mysql | |
37 | - DB=pgsql | |
38 | - DB=sqlite | |
39 | ||
40 | matrix: | |
41 | fast_finish: true | |
42 | include: | |
43 | - php: 7.0 | |
44 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite | |
45 | allow_failures: | |
46 | - php: nightly | |
47 | ||
48 | # exclude v1 branches | |
49 | branches: | |
50 | except: | |
51 | - legacy | |
52 | ||
53 | before_script: | |
54 | - PHP=$TRAVIS_PHP_VERSION | |
55 | - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | |
56 | # xdebug isn't enable for PHP 7.1 | |
57 | - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi | |
58 | - composer self-update --no-progress | |
59 | - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; | |
60 | ||
61 | install: | |
62 | - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.7; fi; | |
63 | - if [[ $ASSETS = build ]]; then npm install -g npm@latest; fi; | |
64 | - if [[ $ASSETS = build ]]; then npm install; fi; | |
65 | ||
66 | before_install: | |
67 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | |
68 | ||
69 | script: | |
70 | - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist | |
71 | - ant prepare-$DB | |
72 | - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi; | |
73 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; | |
74 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; | |
75 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; | |
76 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi; | |
77 | - if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi; |