-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
67 lines (55 loc) · 1.89 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
language: php
sudo: false
git:
depth: 1
cache:
directories:
- $HOME/.composer
- tests/fixtures
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
install:
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
- composer info -D | sort
jobs:
include:
-
stage: Code Standard
php: 7.2
script:
- vendor/bin/phpstan analyse -l 7 src/ || travis_terminate 1
- vendor/bin/php-cs-fixer --diff --diff-format=udiff --dry-run -v fix
- 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
script:
- vendor/bin/parallel-lint --exclude vendor . .php_cs bin/fetch-api-docs bin/generate-classes bin/generate-metadata || travis_terminate 1
- vendor/bin/phpunit
-
<<: *TEST_JOB
stage: Test
php: 7.1
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
-
<<: *TEST_JOB
Stage: Test
php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs" PHP_CS_FIXER_IGNORE_ENV=1
-
<<: *TEST_JOB
stage: Code Coverage
php: 7.2
env: BNET_API_KEY=""
script:
- phpdbg --version 2> /dev/null || travis_terminate 0
- phpdbg -qrr vendor/bin/phpunit -c .travis/phpunit.coverage.xml --coverage-clover build/logs/clover.xml || travis_terminate 1
- php vendor/bin/php-coveralls -v
allow_failures:
- php: nightly