Skip to content

Commit 8247f98

Browse files
committed
Improve CI/CD travis settings
1 parent 9319e5b commit 8247f98

File tree

3 files changed

+63
-53
lines changed

3 files changed

+63
-53
lines changed

.travis.yml

Lines changed: 55 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,63 @@
11
language: php
2-
32
sudo: false
4-
53
cache:
6-
directories:
7-
- $HOME/.composer/cache
8-
9-
env:
10-
global:
11-
- COMPOSER_ARGS="--no-interaction --prefer-source --no-suggest"
12-
4+
directories:
5+
- "$HOME/.composer/cache"
136
matrix:
14-
include:
15-
- php: 7.2
16-
env:
17-
- COLLECT_COVERAGE=true
18-
- VALIDATE_CODING_STYLE=true
19-
- RUN_PHPSTAN=true
20-
- IGNORE_PLATFORMS=false
21-
- php: 7.3
22-
env:
23-
- COLLECT_COVERAGE=true
24-
- VALIDATE_CODING_STYLE=true
25-
- RUN_PHPSTAN=true
26-
- IGNORE_PLATFORMS=false
27-
- php: 7.4
28-
env:
29-
- COLLECT_COVERAGE=true
30-
- VALIDATE_CODING_STYLE=true
31-
- RUN_PHPSTAN=true
32-
- IGNORE_PLATFORMS=false
33-
- php: nightly
34-
env:
35-
- COLLECT_COVERAGE=false
36-
- IGNORE_PLATFORMS=true
37-
- RUN_PHPSTAN=false
38-
- VALIDATE_CODING_STYLE=false
39-
allow_failures:
40-
- php: nightly
41-
fast_finish: true
42-
7+
include:
8+
- php: 7.2
9+
env:
10+
- COLLECT_COVERAGE=false
11+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --prefer-lowest --prefer-stable"
12+
- RUN_PHPSTAN=false
13+
- VALIDATE_CODING_STYLE=false
14+
- php: 7.2
15+
env:
16+
- COLLECT_COVERAGE=true
17+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
18+
- RUN_PHPSTAN=true
19+
- VALIDATE_CODING_STYLE=true
20+
- php: 7.3
21+
env:
22+
- COLLECT_COVERAGE=false
23+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --prefer-lowest --prefer-stable"
24+
- RUN_PHPSTAN=false
25+
- VALIDATE_CODING_STYLE=false
26+
- php: 7.3
27+
env:
28+
- COLLECT_COVERAGE=true
29+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
30+
- RUN_PHPSTAN=true
31+
- VALIDATE_CODING_STYLE=true
32+
- php: 7.4
33+
env:
34+
- COLLECT_COVERAGE=false
35+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --prefer-lowest --prefer-stable"
36+
- RUN_PHPSTAN=false
37+
- VALIDATE_CODING_STYLE=false
38+
- php: 7.4
39+
env:
40+
- COLLECT_COVERAGE=true
41+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
42+
- RUN_PHPSTAN=true
43+
- VALIDATE_CODING_STYLE=true
44+
- php: nightly
45+
env:
46+
- COLLECT_COVERAGE=false
47+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --ignore-platform-reqs"
48+
- RUN_PHPSTAN=false
49+
- VALIDATE_CODING_STYLE=false
50+
allow_failures:
51+
- php: nightly
52+
fast_finish: true
4353
before_install:
44-
- travis_retry composer self-update
45-
54+
- travis_retry composer self-update
4655
install:
47-
- if [ "$IGNORE_PLATFORMS" == "true" ]; then travis_retry composer update $COMPOSER_ARGS --ignore-platform-reqs; fi
48-
- if [ "$IGNORE_PLATFORMS" == "false" ]; then travis_retry composer update $COMPOSER_ARGS; fi
49-
56+
- travis_retry composer update $COMPOSER_ARGS
5057
script:
51-
- if [ "$RUN_PHPSTAN" == "true" ]; then composer phpstan; fi
52-
- if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi
53-
- composer phpunit
54-
58+
- if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi
59+
- if [ "$RUN_PHPSTAN" == "true" ]; then composer phpstan; fi
60+
- composer phpunit
5561
after_script:
56-
- if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/clover.xml; fi
62+
- if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar
63+
&& php ocular.phar code-coverage:upload --format=php-clover build/clover.xml; fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ System Requirements
2727

2828
You need:
2929

30-
- **PHP >= 7.0** but the latest stable version of PHP is recommended
30+
- **PHP >= 7.2.5** but the latest stable version of PHP is recommended
3131
- the `intl` extension
3232

3333
Dependencies

composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,33 @@
2828
],
2929
"keywords": [
3030
"Public Suffix List",
31+
"Top Level Domains",
3132
"domain parsing",
3233
"icann",
34+
"iana",
3335
"idn",
36+
"tld",
3437
"psl"
3538
],
3639
"require": {
37-
"php": "^7.2",
40+
"php": "^7.2.5",
3841
"ext-intl": "*",
3942
"psr/log": "^1.1",
4043
"psr/simple-cache": "^1.0.1"
4144
},
4245
"require-dev": {
4346
"composer/composer": "^1.6",
4447
"friendsofphp/php-cs-fixer": "^2.16",
45-
"mikey179/vfsstream": "^1.6",
48+
"mikey179/vfsstream": "^1.6.7",
4649
"phpstan/phpstan": "^0.12",
4750
"phpstan/phpstan-phpunit": "^0.12",
4851
"phpstan/phpstan-strict-rules": "^0.12",
49-
"phpunit/phpunit": "^8.5"
52+
"phpunit/phpunit": "^8.0"
5053
},
5154
"suggest": {
5255
"psr/simple-cache-implementation": "To enable using other cache providers",
5356
"ext-curl": "To use the package http client",
54-
"league/uri-parser": "To parse URL and validate host"
57+
"league/uri": "To parse URL and validate host"
5558
},
5659
"autoload": {
5760
"psr-4": {

0 commit comments

Comments
 (0)