Skip to content

Commit 9b55160

Browse files
committed
use phive and phars for tools;
use travis_retry for occasional failure points;
1 parent 2053665 commit 9b55160

File tree

6 files changed

+31
-2207
lines changed

6 files changed

+31
-2207
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ bin/validate-json*
1515
temp/ecs/*
1616

1717
# Build folder and vendor folder are generated code; no need to version this
18-
build/*
19-
vendor/*
20-
composer.phar
18+
build/
19+
tools/
20+
vendor/
21+
*.phar
2122

2223
# By default the phpunit.xml.dist is provided; you can override this using a local config file
2324
phpunit.xml

.travis.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
language: php
2-
php:
3-
- 7.1
4-
- 7.2
5-
- nightly
2+
php: [ 7.1, 7.2, nightly ]
63
sudo: false
74

85
env:
@@ -13,33 +10,38 @@ matrix:
1310
- php: nightly
1411

1512
install:
16-
- composer install --no-interaction --prefer-dist --optimize-autoloader
13+
- travis_retry composer install --no-interaction --prefer-dist --optimize-autoloader
14+
- travis_retry wget https://phar.io/releases/phive.phar
15+
- travis_retry php phive.phar --no-progress install --trust-gpg-keys 4AA394086372C20A phpunit
16+
17+
script:
18+
- ./tools/phpunit --no-coverage
1719

1820
jobs:
1921
include:
20-
- stage: test
21-
script:
22-
- vendor/bin/phpunit --no-coverage
23-
2422
- stage: coverage
2523
php: 7.1
24+
before_script:
25+
- echo "code coverage won't work from phpunit.phar, because some of this package's deps are in that phar..."
26+
- travis_retry composer require --dev phpunit/phpunit
2627
script:
27-
- vendor/bin/phpunit
28+
- ./vendor/bin/phpunit
2829
after_script:
29-
- wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
30-
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose
30+
- travis_retry php phive.phar --no-progress install --trust-gpg-keys E82B2FB314E9906E php-coveralls/php-coveralls && ./tools/php-coveralls --verbose
31+
- travis_retry wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
3132

3233
- stage: lint
3334
php: 7.1
3435
before_script:
35-
- composer create-project symplify/easy-coding-standard temp/ecs
36+
- travis_retry php phive.phar --no-progress install --trust-gpg-keys 8E730BA25823D8B5 phpstan
3637
script:
37-
- temp/ecs/bin/ecs check src tests
38-
- vendor/bin/phpstan analyse src --level max --configuration phpstan.neon
38+
- ./tools/phpstan analyse src --level max --configuration phpstan.neon
39+
- composer create-project symplify/easy-coding-standard temp/ecs && temp/ecs/bin/ecs check src tests
3940

4041
cache:
4142
directories:
4243
- $HOME/.composer/cache/files
44+
- $HOME/.phive
4345

4446
notifications:
4547
irc: "irc.freenode.org#phpdocumentor"

appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ install:
4545
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
4646
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://getcomposer.org/composer.phar
4747
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
48+
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://phar.phpunit.de/phpunit.phar
49+
- IF NOT EXIST php-installed.txt echo @php %%~dp0phpunit.phar %%* > phpunit.bat
4850
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
4951
- cd c:\typeresolver
5052
- composer install --no-interaction --prefer-dist --no-progress
5153

5254
test_script:
5355
- cd c:\typeresolver
54-
- vendor/bin/phpunit --no-coverage
56+
- phpunit --no-coverage

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
"phpdocumentor/reflection-common": "^1.0"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^6.5",
17-
"mockery/mockery": "^1.0",
18-
"phpstan/phpstan": "^0.9.0"
16+
"mockery/mockery": "^1.0"
1917
},
2018
"autoload": {
2119
"psr-4": {

0 commit comments

Comments
 (0)