-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (41 loc) · 1.37 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
language: php
php:
- 7.4
- 8.0
# Note that PHP_CS_FIXER_IGNORE_ENV=1 is defined because php-cs-fixer complains about php higher than 8.0.
# Remove it after closing https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4702
env:
- PREFER_LOWEST=1 PHP_CS_FIXER_IGNORE_ENV=1
- PREFER_LOWEST=0 PHP_CS_FIXER_IGNORE_ENV=1
cache:
directories:
- $HOME/.composer/cache
os:
- linux
addons:
apt:
packages:
- tesseract-ocr
- tesseract-ocr-eng
- tesseract-ocr-deu
- tesseract-ocr-spa
- docker-ce
branches:
only:
- master
before_script:
- composer validate
- composer install
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest; fi
script:
- sh tests/prepareData.sh
- php phing.phar build-ci
- composer outdated -D
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -Ls https://coverage.codacy.com/get.sh) report
- rm -rf tests/tmp && chmod 777 tests && chmod 666 clover.xml
- docker build --build-arg PHP_VERSION="$(php -r 'echo PHP_MAJOR_VERSION, ".", PHP_MINOR_VERSION;')" -t php-ffi ./Resources/configs/docker/php
- docker run -v "$(pwd)":/var/www/html php-ffi su -c "cd /var/www/html && sh tests/prepareData.sh && php -d=xdebug.mode=coverage vendor/bin/phpunit" -s /bin/bash www-data
after_success:
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -Ls https://coverage.codacy.com/get.sh) report