File tree Expand file tree Collapse file tree 4 files changed +88
-27
lines changed
Expand file tree Collapse file tree 4 files changed +88
-27
lines changed Original file line number Diff line number Diff line change 1+ name : " testing"
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ qa :
11+ name : Quality assurance
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v2
17+
18+ - name : Validate composer.json and composer.lock
19+ run : composer validate
20+
21+ - name : Cache Composer packages
22+ id : composer-cache
23+ uses : actions/cache@v2
24+ with :
25+ path : vendor
26+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
27+ restore-keys : |
28+ ${{ runner.os }}-php-
29+
30+ - name : Install dependencies
31+ if : steps.composer-cache.outputs.cache-hit != 'true'
32+ run : composer install --prefer-dist --no-progress --no-suggest
33+
34+ - name : Coding Standard
35+ run : composer run-script cs
36+
37+ tests :
38+ name : Tests
39+ runs-on : ubuntu-latest
40+
41+ strategy :
42+ matrix :
43+ php :
44+ - 7.2
45+ - 7.3
46+ - 7.4
47+ composer-args : [ "" ]
48+ include :
49+ - php : 8.0
50+ composer-args : --ignore-platform-reqs
51+ fail-fast : false
52+
53+ steps :
54+ - name : Checkout
55+ uses : actions/checkout@v2
56+
57+ - name : Install PHP
58+ uses : shivammathur/setup-php@v2
59+ with :
60+ php-version : ${{ matrix.php }}
61+
62+ - name : Cache PHP dependencies
63+ uses : actions/cache@v2
64+ with :
65+ path : vendor
66+ key : ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
67+ restore-keys : ${{ runner.os }}-php-${{ matrix.php }}-composer-
68+
69+ - name : Install dependencies
70+ run : composer install --prefer-dist --no-progress --no-suggest ${{ matrix.composer-args }}
71+
72+ - name : Tests
73+ run : composer test
74+
75+ - name : Tests coverage
76+ run : composer coverage
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33[ ![ Latest Version on Packagist] [ ico-version ]] [ link-packagist ]
44[ ![ Software License] [ ico-license ]] ( LICENSE )
5- [ ![ Build Status] [ ico-travis ]] [ link-travis ]
6- [ ![ Quality Score] [ ico-scrutinizer ]] [ link-scrutinizer ]
5+ ![ Testing] [ ico-ga ]
76[ ![ Total Downloads] [ ico-downloads ]] [ link-downloads ]
87
98Middleware to catch and format errors encountered while handling the request.
@@ -76,11 +75,9 @@ The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.
7675
7776[ ico-version ] : https://img.shields.io/packagist/v/middlewares/error-handler.svg?style=flat-square
7877[ ico-license ] : https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
79- [ ico-travis ] : https://img.shields.io/travis/middlewares/error-handler/master.svg?style=flat-square
80- [ ico-scrutinizer ] : https://img.shields.io/scrutinizer/g/middlewares/error-handler.svg?style=flat-square
78+ [ ico-ga ] : https://github.com/middlewares/error-handler/workflows/testing/badge.svg
8179[ ico-downloads ] : https://img.shields.io/packagist/dt/middlewares/error-handler.svg?style=flat-square
8280
8381[ link-packagist ] : https://packagist.org/packages/middlewares/error-handler
84- [ link-travis ] : https://travis-ci.org/middlewares/error-handler
8582[ link-scrutinizer ] : https://scrutinizer-ci.com/g/middlewares/error-handler
8683[ link-downloads ] : https://packagist.org/packages/middlewares/error-handler
Original file line number Diff line number Diff line change 1919 "issues" : " https://github.com/middlewares/error-handler/issues"
2020 },
2121 "require" : {
22- "php" : " ^7.2" ,
22+ "php" : " ^7.2 || ^8.0 " ,
2323 "middlewares/utils" : " ^3.0" ,
2424 "psr/http-server-middleware" : " ^1.0"
2525 },
2626 "require-dev" : {
27- "phpunit/phpunit" : " ^8.1 " ,
27+ "phpunit/phpunit" : " ^8|^9 " ,
2828 "zendframework/zend-diactoros" : " ^2.2" ,
2929 "friendsofphp/php-cs-fixer" : " ^2.0" ,
3030 "squizlabs/php_codesniffer" : " ^3.0" ,
31- "oscarotero/php-cs-fixer-config" : " ^1.0"
31+ "oscarotero/php-cs-fixer-config" : " ^1.0" ,
32+ "phpstan/phpstan" : " ^0.12"
3233 },
3334 "autoload" : {
3435 "psr-4" : {
4142 }
4243 },
4344 "scripts" : {
44- "test " : [
45- " phpunit --coverage-text " ,
46- " phpcs "
47- ] ,
48- "cs-fix " : " php-cs-fixer fix . " ,
49- "coverage" : " phpunit --coverage-html=coverage"
45+ "cs " : " phpcs " ,
46+ "cs-fix" : " php-cs-fixer fix " ,
47+ "phpstan" : " phpstan analyse " ,
48+ "test" : " phpunit " ,
49+ "coverage " : " phpunit --coverage-text " ,
50+ "coverage-html " : " phpunit --coverage-html=coverage"
5051 }
5152}
You can’t perform that action at this time.
0 commit comments