-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
83 lines (69 loc) · 2.9 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
language: php
sudo: false
git:
depth: 1
cache:
directories:
- $HOME/.composer
env:
global:
- DEFAULT_COMPOSER_FLAGS="--optimize-autoloader --no-interaction --no-progress"
- COMPOSER_FLAGS=""
before_install:
- phpenv config-rm xdebug.ini || return 0
- composer global show hirak/prestissimo -q || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS hirak/prestissimo
jobs:
include:
-
stage: Code Standard
php: 7.2
env: COMPOSER_FLAGS="--no-dev --prefer-stable"
install:
- composer global show friendsofphp/php-cs-fixer -q || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS friendsofphp/php-cs-fixer
- composer global show localheinz/composer-normalize -q || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS localheinz/composer-normalize
- composer global show maglnet/composer-require-checker -q || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS maglnet/composer-require-checker
- composer global show phpstan/phpstan -q || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS phpstan/phpstan
- composer global info -D | sort
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
- composer info -D | sort
script:
- $HOME/.composer/vendor/bin/phpstan analyse -l 7 src/ functions.php || travis_terminate 1
- $HOME/.composer/vendor/bin/php-cs-fixer --diff --dry-run -v fix
- $HOME/.composer/vendor/bin/composer-require-checker check --config-file=.composer-require-checker.json composer.json || travis_terminate 1
- composer normalize ./composer.json --dry-run
- &TEST_JOB
stage: Test
php: 7.2
install:
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
- composer info -D | sort
script:
- vendor/bin/parallel-lint --exclude vendor . .php_cs bin/generate || travis_terminate 1
- vendor/bin/phpunit
-
<<: *TEST_JOB
php: 5.5
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
-
<<: *TEST_JOB
php: 5.6
-
<<: *TEST_JOB
php: 7.0
-
<<: *TEST_JOB
stage: Test
php: 7.1
-
<<: *TEST_JOB
php: nightly
-
<<: *TEST_JOB
stage: Code Coverage
php: 7.2
script:
- phpdbg --version 2> /dev/null || travis_terminate 0
- phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml || travis_terminate 1
- php vendor/bin/php-coveralls -v
allow_failures:
- php: nightly