-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
33 lines (28 loc) · 1.02 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
dist: bionic
language: php
php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1.0
env:
- COVERAGE=0 INSTALL_PROPHECY=1 CS_CHECK=0
matrix:
include:
- php: 7.4
env: COVERAGE=1 INSTALL_PROPHECY=1
- php: 7.4
env: CS_CHECK=1 INSTALL_PROPHECY=1
- php: 7.1
env: INSTALL_PROPHECY=0
before_script:
- if [[ "$COVERAGE" -eq 0 ]]; then composer install; else composer require php-coveralls/php-coveralls --dev; fi
- if [[ "$INSTALL_PROPHECY" -eq 1 ]]; then composer require phpspec/prophecy --dev; fi
- if [[ "$CS_CHECK" -eq 1 ]]; then wget -q https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.11.0/php-cs-fixer.phar; fi
script:
- if [[ "$COVERAGE" -gt 0 ]]; then mkdir -p build/logs; vendor/bin/phpunit --coverage-clover=build/logs/clover.xml; fi
- if [ "$COVERAGE" -eq 0 ] -a [ $CS_CHECK -eq 0 ]; then vendor/bin/phpunit; fi
- if [[ "$CS_CHECK" -eq 1 ]]; then php php-cs-fixer.phar fix --dry-run --verbose --diff; fi
after_script:
- if [[ "$COVERAGE" -gt 0 ]]; then vendor/bin/php-coveralls; fi