forked from browscap/browscap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
159 lines (133 loc) · 6 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
language: php
sudo: false
php:
- 7.1
- 7.2
- 7.3
- 7.4
os: linux
cache:
directories:
- $HOME/.composer/cache
stages:
- composer validate
- check dependencies
- validate sources and tests
- style check
- static code analysis
- test
- test with coverage
- integration tests
before_install:
- stty cols 130
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry composer self-update
install: travis_retry composer install --optimize-autoloader --prefer-dist --no-progress --no-interaction -vv $COMPOSER_FLAGS
script: vendor/bin/phpunit -c phpunit.xml.dist --no-coverage --colors --columns 117 --verbose
jobs:
allow_failures:
- php: nightly
include:
- php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs"
- stage: test with coverage
php: 7.2
before_install:
- stty cols 130
- echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry composer self-update
script: vendor/bin/phpunit -c phpunit.xml.dist --colors --columns 117 --verbose --coverage-text --coverage-clover=coverage.clover
after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage.clover
- stage: composer validate
php: 7.2
env: COMPOSER_FLAGS=""
install: skip
script: composer validate --strict
- stage: composer validate
php: 7.2
env: COMPOSER_FLAGS=""
script: composer normalize --dry-run
- stage: check dependencies
php: 7.1
env: COMPOSER_FLAGS=""
script: composer outdated --direct
- stage: check dependencies
php: 7.2
env: COMPOSER_FLAGS=""
script: composer outdated --direct
- stage: check dependencies
php: 7.3
env: COMPOSER_FLAGS=""
script: composer outdated --direct
- stage: check dependencies
php: 7.4
env: COMPOSER_FLAGS=""
script: composer outdated --direct
- stage: check dependencies
php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs"
script: composer outdated --direct
- stage: style check
php: 7.2
script: php -n -d memory_limit=768M vendor/bin/php-cs-fixer fix --dry-run -vv
- stage: static code analysis
php: 7.2
script: vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=768M --no-progress
- stage: validate sources and tests
php: 7.2
script: bin/browscap -v check-duplicate-tests
- stage: validate sources and tests
php: 7.2
script: bin/browscap -v validate
- stage: integration tests
php: 7.2
env:
- parser="browscap-php 4.2"
- TEST_SET="full"
script: php -n vendor/bin/phpunit -c tests/phpunit-integration.xml.dist --no-coverage --colors --columns 121 --verbose tests/UserAgentsTest/V4/FullTest.php
after_success: bash <(curl -s https://codecov.io/bash) -f coverage-full4.json -F full
- stage: integration tests
php: 7.2
env:
- parser="browscap-php 4.2"
- TEST_SET="standard"
script: php -n vendor/bin/phpunit -c tests/phpunit-integration.xml.dist --no-coverage --colors --columns 121 --verbose tests/UserAgentsTest/V4/StandardTest.php
after_success: bash <(curl -s https://codecov.io/bash) -f coverage-standard4.json -F standard
- stage: integration tests
php: 7.2
env:
- parser="browscap-php 4.2"
- TEST_SET="lite"
script: php -n vendor/bin/phpunit -c tests/phpunit-integration.xml.dist --no-coverage --colors --columns 119 --verbose tests/UserAgentsTest/V4/LiteTest.php
after_success: bash <(curl -s https://codecov.io/bash) -f coverage-lite4.json -F lite
- stage: integration tests
php: 7.2
env:
- parser="browscap-php 3.1"
- TEST_SET="full"
install:
- travis_retry composer require --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-update -vv $COMPOSER_FLAGS browscap/browscap-php:3.1 friendsofphp/php-cs-fixer:2.12 symfony/console:3.3 symfony/finder:3.3 symfony/filesystem:3.3
- travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction -vv $COMPOSER_FLAGS
script: php -n vendor/bin/phpunit -c tests/phpunit-integration.xml.dist --no-coverage --colors --columns 121 --verbose tests/UserAgentsTest/V3/FullTest.php
- stage: integration tests
php: 7.2
env:
- parser="browscap-php 3.1"
- TEST_SET="standard"
install:
- travis_retry composer require --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-update -vv $COMPOSER_FLAGS browscap/browscap-php:3.1 friendsofphp/php-cs-fixer:2.12 symfony/console:3.3 symfony/finder:3.3 symfony/filesystem:3.3
- travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction -vv $COMPOSER_FLAGS
script: php -n vendor/bin/phpunit -c tests/phpunit-integration.xml.dist --no-coverage --colors --columns 121 --verbose tests/UserAgentsTest/V3/StandardTest.php
- stage: integration tests
php: 7.2
env:
- parser="browscap-php 3.1"
- TEST_SET="lite"
install:
- travis_retry composer require --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-update -vv $COMPOSER_FLAGS browscap/browscap-php:3.1 friendsofphp/php-cs-fixer:2.12 symfony/console:3.3 symfony/finder:3.3 symfony/filesystem:3.3
- travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction -vv $COMPOSER_FLAGS
script: php -n vendor/bin/phpunit -c tests/phpunit-integration.xml.dist --no-coverage --colors --columns 119 --verbose tests/UserAgentsTest/V3/LiteTest.php