aboutsummaryrefslogtreecommitdiffhomepage
path: root/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml40
1 files changed, 16 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml
index 39306343..229e3e0e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,11 @@
1language: php 1language: php
2 2
3services: 3services:
4 - mysql
5 - postgresql
4 - rabbitmq 6 - rabbitmq
5 - redis 7 - redis
6 8
7# used for HHVM
8addons:
9 apt:
10 packages:
11 - tidy
12
13# cache vendor dirs 9# cache vendor dirs
14cache: 10cache:
15 apt: true 11 apt: true
@@ -21,10 +17,10 @@ cache:
21 - $HOME/.yarn-cache 17 - $HOME/.yarn-cache
22 18
23php: 19php:
24 - 5.6
25 - 7.0
26 - 7.1 20 - 7.1
27 - 7.2 21 - 7.2
22 - 7.3
23 - 7.4
28 - nightly 24 - nightly
29 25
30node_js: 26node_js:
@@ -38,9 +34,10 @@ env:
38matrix: 34matrix:
39 fast_finish: true 35 fast_finish: true
40 include: 36 include:
41 - php: 7.0 37 - php: 7.2
42 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite 38 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
43 allow_failures: 39 allow_failures:
40 - php: 7.4
44 - php: nightly 41 - php: nightly
45 42
46# exclude v1 branches 43# exclude v1 branches
@@ -58,31 +55,26 @@ install:
58 55
59before_script: 56before_script:
60 - PHP=$TRAVIS_PHP_VERSION 57 - PHP=$TRAVIS_PHP_VERSION
61 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; 58 - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
62 # xdebug isn't enable for PHP 7.1 59 - phpenv config-rm xdebug.ini || echo "xdebug not available"
63 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
64 - composer self-update --no-progress 60 - composer self-update --no-progress
65 - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; 61 # install imagick
66 # increase swap to avoid "proc_open(): fork failed - Cannot allocate memory" 62 - pear config-set preferred_state beta
67 # this should be removed when no more PHP 5 build will be defined 63 - pecl channel-update pecl.php.net
68 - sudo swapon -s 64 - yes | pecl install imagick
69 - sudo fallocate -l 4G /swapfile
70 - sudo chmod 600 /swapfile
71 - sudo mkswap /swapfile
72 - sudo swapon /swapfile
73 - sudo swapon -s
74 65
75script: 66script:
76 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist 67 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
68
77 - echo "travis_fold:start:prepare" 69 - echo "travis_fold:start:prepare"
78 - make prepare DB=$DB 70 - make prepare DB=$DB
79 - echo "travis_fold:end:prepare" 71 - echo "travis_fold:end:prepare"
80 72
81 - echo "travis_fold:start:fixtures" 73 - make fixtures
82 - php bin/console doctrine:fixtures:load --no-interaction --env=test
83 - echo "travis_fold:end:fixtures"
84 74
85 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi; 75 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
76 # PHPStan needs PHPUnit to be installed and cache app to be generated
77 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then php bin/phpstan analyse src tests --no-progress --level 1 ; fi;
86 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi; 78 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
87 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; 79 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
88 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; 80 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;