2020-05-25 06:16:16 +02:00
|
|
|
os: linux
|
|
|
|
dist: xenial
|
2015-01-30 09:09:53 +01:00
|
|
|
language: php
|
2015-01-31 09:15:51 +01:00
|
|
|
|
2016-02-15 20:35:28 +01:00
|
|
|
services:
|
2019-06-12 20:34:12 +02:00
|
|
|
- mysql
|
|
|
|
- postgresql
|
2018-11-23 08:50:16 +01:00
|
|
|
- rabbitmq
|
|
|
|
- redis
|
2015-03-27 19:47:30 +01:00
|
|
|
|
2015-03-28 00:23:25 +01:00
|
|
|
# cache vendor dirs
|
|
|
|
cache:
|
2016-03-20 21:10:17 +01:00
|
|
|
apt: true
|
2015-03-28 00:23:25 +01:00
|
|
|
directories:
|
2020-05-25 06:16:16 +02:00
|
|
|
- $HOME/.composer/cache/files
|
2016-03-08 17:02:34 +01:00
|
|
|
- node_modules
|
|
|
|
- $HOME/.npm
|
2017-05-09 22:53:01 +02:00
|
|
|
- $HOME/.yarn-cache
|
2015-03-28 00:23:25 +01:00
|
|
|
|
2020-02-23 00:43:26 +01:00
|
|
|
if: |
|
|
|
|
type = pull_request OR \
|
|
|
|
branch = master
|
|
|
|
|
2015-01-30 11:23:18 +01:00
|
|
|
php:
|
2017-07-24 15:48:53 +02:00
|
|
|
- 7.2
|
2018-11-27 10:29:11 +01:00
|
|
|
- 7.3
|
2019-07-26 13:59:39 +02:00
|
|
|
- 7.4
|
2015-09-26 11:56:15 +02:00
|
|
|
|
|
|
|
env:
|
2016-09-09 21:30:13 +02:00
|
|
|
- DB=mysql
|
|
|
|
- DB=pgsql
|
|
|
|
- DB=sqlite
|
2015-03-27 19:58:48 +01:00
|
|
|
|
2020-05-25 06:16:16 +02:00
|
|
|
jobs:
|
2015-03-28 00:23:25 +01:00
|
|
|
fast_finish: true
|
2016-03-20 21:10:17 +01:00
|
|
|
include:
|
2020-02-23 00:43:26 +01:00
|
|
|
- php: 7.3
|
2016-10-04 10:25:49 +02:00
|
|
|
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
2015-01-31 09:15:51 +01:00
|
|
|
|
2016-02-24 13:47:54 +01:00
|
|
|
# exclude v1 branches
|
2015-01-19 13:37:32 +01:00
|
|
|
branches:
|
2016-02-24 13:47:54 +01:00
|
|
|
except:
|
2016-04-18 21:46:36 +02:00
|
|
|
- legacy
|
2015-03-28 00:23:25 +01:00
|
|
|
|
2018-11-23 21:48:35 +01:00
|
|
|
before_install:
|
|
|
|
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
|
2016-06-03 14:24:54 +02:00
|
|
|
- PHP=$TRAVIS_PHP_VERSION
|
2018-12-05 14:29:46 +01:00
|
|
|
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
|
|
|
- phpenv config-rm xdebug.ini || echo "xdebug not available"
|
2019-05-10 15:47:47 +02:00
|
|
|
# install imagick
|
|
|
|
- pear config-set preferred_state beta
|
|
|
|
- pecl channel-update pecl.php.net
|
|
|
|
- yes | pecl install imagick
|
2016-02-27 11:26:09 +01:00
|
|
|
|
2020-05-25 06:16:16 +02:00
|
|
|
install:
|
2020-08-25 12:22:29 +02:00
|
|
|
- if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 12; fi;
|
2020-05-25 06:16:16 +02:00
|
|
|
- if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
|
|
|
|
- if [[ $ASSETS = build ]]; then yarn install; fi;
|
|
|
|
- composer install -o --no-interaction --no-progress --prefer-dist --no-suggest
|
|
|
|
- php bin/simple-phpunit install
|
2018-12-05 14:29:46 +01:00
|
|
|
|
2020-05-25 06:16:16 +02:00
|
|
|
before_script:
|
2019-01-23 13:47:51 +01:00
|
|
|
- make prepare DB=$DB
|
2018-10-24 21:02:35 +02:00
|
|
|
- make fixtures
|
2017-05-19 11:41:10 +02:00
|
|
|
|
2020-05-25 06:16:16 +02:00
|
|
|
script:
|
2019-07-08 14:12:53 +02:00
|
|
|
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
2019-01-17 14:28:05 +01:00
|
|
|
# PHPStan needs PHPUnit to be installed and cache app to be generated
|
2020-06-15 08:25:59 +02:00
|
|
|
- if [[ $CS_FIXER = run ]]; then php bin/phpstan analyse ; fi;
|
2017-07-03 07:30:54 +02:00
|
|
|
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
2016-09-09 21:30:13 +02:00
|
|
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
|
2016-10-19 20:10:42 +02:00
|
|
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
|
2016-11-20 22:24:48 +01:00
|
|
|
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
|
2017-05-01 12:43:20 +02:00
|
|
|
- if [[ $ASSETS = build ]]; then yarn run build:prod; fi;
|