forked from sulu/SuluFormBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (45 loc) · 1.47 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
sudo: false
dist: trusty
language: php
cache:
directories:
- "$HOME/.composer/cache/files"
env:
global:
- SYMFONY__DATABASE__VERSION=5.5.39
services:
- mysql
matrix:
include:
- php: 5.5
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction" # --prefer-lowest TODO FIXME sulu 1.3 issue
- ENABLE_SWAP=true
- php: 7.3
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
- CODE_COVERAGE=true
- PHPSTAN=true
before_install:
- phpenv config-add Tests/travis.php.ini
- | # enable swap
if [[ $ENABLE_SWAP == 'true' ]]; then
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo sysctl vm.swappiness=10
fi
- composer self-update
install:
- if [[ $PHPSTAN == 'true' ]]; then travis_retry composer require --dev phpstan/phpstan --no-update ; fi
- travis_retry composer update $COMPOSER_FLAGS
- composer info -i
- ./Tests/app/console doctrine:database:create
- ./Tests/app/console doctrine:schema:update --force
script:
- ./vendor/bin/phpunit --coverage-clover=coverage.clover
- if [[ $PHPSTAN == 'true' ]]; then ./vendor/bin/phpstan analyse ./ --level 1 -c phpstan.neon ; fi
after_script:
- if [[ $CODE_COVERAGE == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi
- if [[ $CODE_COVERAGE == 'true' ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover ; fi