forked from getkirby/editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (41 loc) · 1.17 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
language: php
os: linux
dist: bionic
sudo: false
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
jobs:
allow_failures:
- php: 7.4snapshot
before_install:
# set up PHP config
- phpenv config-rm xdebug.ini || true # code coverage is generated with PCOV
- phpenv config-add tests/php.ini
# ensure that the Composer config is valid
- composer validate
install:
# install Composer packages, will also trigger dump-autoload
- composer require -n --ignore-platform-reqs "phwoolcon/ci-pecl-cacher" "phpunit/phpunit:^7" "pcov/clobber" "friendsofphp/php-cs-fixer" "php-coveralls/php-coveralls"
- composer install -n --ignore-platform-reqs --no-suggest
# install and cache PHP extensions
- ./vendor/bin/ci-pecl-install pcov
before_script:
- mkdir -p build/logs
- ./vendor/bin/pcov clobber
- ls -al
script:
- ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --config .php_cs --verbose --diff --dry-run
after_success:
- travis_retry ./vendor/bin/php-coveralls -v
cache:
directories:
- vendor
- $HOME/.composer/cache
- $HOME/.php-cs-fixer
- $HOME/pecl_cache
matrix:
fast_finish: true