-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
61 lines (55 loc) · 1.72 KB
/
.travis.yml
File metadata and controls
61 lines (55 loc) · 1.72 KB
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
55
56
57
58
59
60
61
language: php
cache:
directories:
- $HOME/.composer/cache
- $HOME/bin
.steps:
- &disable-php-memory-limit |
echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- &disable-xdebug-php-extension |
if [[ ${COVERAGE} != yes ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
- &update-project-dependencies |
composer update --prefer-dist --no-progress --no-suggest --ansi
- &install-php-coveralls |
composer require php-coveralls/php-coveralls --no-scripts
- &install-scrutinizer-ocular |
composer require scrutinizer/ocular --no-scripts
- &upload-coverage |
travis_retry vendor/bin/php-coveralls
travis_retry vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml
- &install-robo |
mkdir -p ${HOME}/bin || echo "directory exists"
export ROBO=${HOME}/bin/robo
[ -f "${ROBO}" ] && echo "installed" || wget -c https://github.com/kilip/robo/raw/site/robotheme/robo.phar -O ${ROBO}
chmod +x $ROBO
export PATH=${HOME}/bin:${PATH}
- &run-test |
./vendor/bin/phpcs
robo test
- &run-test-coverage
robo coverage
- &start-php-server
php -S localhost:8000 -t tests/Fixtures/public > /dev/null 2>&1 &
jobs:
include:
- php: '7.0'
- php: '7.1'
- php: '7.2'
- php: '7.3'
env: COVERAGE=yes
before_cache:
- *install-php-coveralls
- *install-scrutinizer-ocular
before_script: *start-php-server
script:
- *run-test-coverage
after_script:
- *upload-coverage
before_install:
- *disable-php-memory-limit
- *disable-xdebug-php-extension
- *install-robo
install:
- *update-project-dependencies
script:
- *run-test