]> git.immae.eu Git - github/wallabag/wallabag.git/blob - .travis.yml
Merge pull request #4438 from wallabag/dependabot/composer/scheb/two-factor-bundle...
[github/wallabag/wallabag.git] / .travis.yml
1 os: linux
2 dist: xenial
3 language: php
4
5 services:
6 - mysql
7 - postgresql
8 - rabbitmq
9 - redis
10
11 # cache vendor dirs
12 cache:
13 apt: true
14 directories:
15 - $HOME/.composer/cache/files
16 - node_modules
17 - $HOME/.npm
18 - $HOME/.yarn-cache
19
20 if: |
21 type = pull_request OR \
22 branch = master
23
24 php:
25 - 7.1
26 - 7.2
27 - 7.3
28 - 7.4
29
30 node_js:
31 - "5"
32
33 env:
34 - DB=mysql
35 - DB=pgsql
36 - DB=sqlite
37
38 jobs:
39 fast_finish: true
40 include:
41 - php: 7.3
42 env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
43
44 # exclude v1 branches
45 branches:
46 except:
47 - legacy
48
49 before_install:
50 - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
51 - PHP=$TRAVIS_PHP_VERSION
52 - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
53 - phpenv config-rm xdebug.ini || echo "xdebug not available"
54 - composer self-update --no-progress
55 # install imagick
56 - pear config-set preferred_state beta
57 - pecl channel-update pecl.php.net
58 - yes | pecl install imagick
59
60 install:
61 - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi;
62 - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi;
63 - if [[ $ASSETS = build ]]; then yarn install; fi;
64 - composer install -o --no-interaction --no-progress --prefer-dist --no-suggest
65 - php bin/simple-phpunit install
66
67 before_script:
68 - make prepare DB=$DB
69 - make fixtures
70
71 script:
72 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
73 # PHPStan needs PHPUnit to be installed and cache app to be generated
74 - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then php bin/phpstan analyse src tests --no-progress --level 1 ; fi;
75 - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
76 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
77 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi;
78 - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v ; fi;
79 - if [[ $ASSETS = build ]]; then yarn run build:prod; fi;