File tree 4 files changed +87
-27
lines changed
4 files changed +87
-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 2
2
3
3
[ ![ Latest Version on Packagist] [ ico-version ]] [ link-packagist ]
4
4
[ ![ Software License] [ ico-license ]] ( LICENSE )
5
- [ ![ Build Status] [ ico-travis ]] [ link-travis ]
6
- [ ![ Quality Score] [ ico-scrutinizer ]] [ link-scrutinizer ]
5
+ ![ Testing] [ ico-ga ]
7
6
[ ![ Total Downloads] [ ico-downloads ]] [ link-downloads ]
8
7
9
8
Middleware to encode the response body to ` gzip ` or ` deflate ` if the ` Accept-Encoding ` header is present and adds the ` Content-Encoding ` header. This package is splitted into the following components:
@@ -92,11 +91,9 @@ The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.
92
91
93
92
[ ico-version ] : https://img.shields.io/packagist/v/middlewares/encoder.svg?style=flat-square
94
93
[ ico-license ] : https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
95
- [ ico-travis ] : https://img.shields.io/travis/middlewares/encoder/master.svg?style=flat-square
96
- [ ico-scrutinizer ] : https://img.shields.io/scrutinizer/g/middlewares/encoder.svg?style=flat-square
94
+ [ ico-ga ] : https://github.com/middlewares/encoder/workflows/testing/badge.svg
97
95
[ ico-downloads ] : https://img.shields.io/packagist/dt/middlewares/encoder.svg?style=flat-square
98
96
99
97
[ link-packagist ] : https://packagist.org/packages/middlewares/encoder
100
- [ link-travis ] : https://travis-ci.org/middlewares/encoder
101
98
[ link-scrutinizer ] : https://scrutinizer-ci.com/g/middlewares/encoder
102
99
[ link-downloads ] : https://packagist.org/packages/middlewares/encoder
Original file line number Diff line number Diff line change 19
19
},
20
20
"require" : {
21
21
"ext-zlib" : " *" ,
22
- "php" : " ^7.2" ,
22
+ "php" : " ^7.2 || ^8.0 " ,
23
23
"middlewares/utils" : " ^3.0" ,
24
24
"psr/http-server-middleware" : " ^1.0"
25
25
},
26
26
"require-dev" : {
27
- "phpunit/phpunit" : " ^8.1 " ,
27
+ "phpunit/phpunit" : " ^8|^9 " ,
28
28
"laminas/laminas-diactoros" : " ^2.2" ,
29
29
"friendsofphp/php-cs-fixer" : " ^2.0" ,
30
30
"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"
32
33
},
33
34
"autoload" : {
34
35
"psr-4" : {
41
42
}
42
43
},
43
44
"scripts" : {
44
- "test" : [
45
- " phpunit --coverage-text" ,
46
- " phpcs"
47
- ],
45
+ "cs" : " phpcs" ,
48
46
"cs-fix" : " php-cs-fixer fix" ,
49
- "coverage" : " phpunit --coverage-html=coverage"
47
+ "phpstan" : " phpstan analyse" ,
48
+ "test" : " phpunit" ,
49
+ "coverage" : " phpunit --coverage-text" ,
50
+ "coverage-html" : " phpunit --coverage-html=coverage"
50
51
}
51
52
}
You can’t perform that action at this time.
0 commit comments