File tree Expand file tree Collapse file tree 6 files changed +78
-31
lines changed Expand file tree Collapse file tree 6 files changed +78
-31
lines changed Original file line number Diff line number Diff line change
1
+ name : " Test"
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ tests :
7
+ name : " Tests"
8
+
9
+ runs-on : ${{ matrix.operating-system }}
10
+
11
+ strategy :
12
+ matrix :
13
+ dependencies : ["lowest", "highest"]
14
+ php-version :
15
+ - " 7.4"
16
+ - " 8.0"
17
+ - " 8.1"
18
+ operating-system : ["ubuntu-latest"]
19
+
20
+ steps :
21
+ - name : " Checkout"
22
+ uses : " actions/checkout@v2"
23
+
24
+ - name : " Install PHP"
25
+ uses : " shivammathur/setup-php@v2"
26
+ with :
27
+ coverage : " none"
28
+ php-version : " ${{ matrix.php-version }}"
29
+
30
+ - name : " Cache dependencies"
31
+ uses : " actions/cache@v2"
32
+ with :
33
+ path : " ~/.composer/cache"
34
+ key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
35
+ restore-keys : " php-${{ matrix.php-version }}-composer-"
36
+
37
+ - name : " Install lowest dependencies"
38
+ if : ${{ matrix.dependencies == 'lowest' }}
39
+ run : " composer update --prefer-lowest --prefer-dist --no-interaction --no-progress --no-suggest"
40
+
41
+ - name : " Install highest dependencies"
42
+ if : ${{ matrix.dependencies == 'highest' }}
43
+ run : " composer update --prefer-dist --no-interaction --no-progress --no-suggest"
44
+
45
+ - name : " Unit tests"
46
+ run : " vendor/bin/phpunit"
47
+
48
+ - name : " Coding style"
49
+ run : " vendor/bin/phpcs --report=summary"
50
+
51
+ - name : " Static analysis"
52
+ run : " vendor/bin/phpstan --no-progress"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 25
25
},
26
26
"require-dev" : {
27
27
"phpunit/phpunit" : " ^9.5" ,
28
- "phpspec/prophecy-phpunit" : " ^2.0"
28
+ "phpspec/prophecy-phpunit" : " ^2.0" ,
29
+ "squizlabs/php_codesniffer" : " ^3.6" ,
30
+ "brainbits/phpcs-standard" : " ^5.0" ,
31
+ "phpstan/phpstan" : " ^0.12.99" ,
32
+ "brainbits/phpstan-rules" : " ^2.0"
29
33
},
30
34
"autoload" : {
31
35
"psr-4" : { "Brainbits\\ Transcoder\\ " : " src/" }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <ruleset xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" name =" PHP_CodeSniffer" xsi : noNamespaceSchemaLocation =" https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd" >
3
+ <file extension =" php" >src/</file >
4
+ <arg name =" basepath" value =" ." />
5
+ <arg name =" colors" />
6
+ <rule ref =" Brainbits" >
7
+ <exclude name =" SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix" />
8
+ <exclude name =" SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix" />
9
+ </rule >
10
+ </ruleset >
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ checkMissingIterableValueType : false
3
+ level : 8
4
+ paths :
5
+ - src
6
+ bootstrapFiles :
7
+ - vendor/autoload.php
8
+ includes :
9
+ - vendor/brainbits/phpstan-rules/rules.neon
Original file line number Diff line number Diff line change 3
3
colors =" true"
4
4
convertErrorsToExceptions =" true"
5
5
convertNoticesToExceptions =" true"
6
- convertWarningsToExceptions =" true"
7
- syntaxCheck =" true" >
6
+ convertWarningsToExceptions =" true" >
8
7
<testsuite name =" transcoder" >
9
- <directory >tests</directory >
8
+ <directory suffix = " .php " >tests</directory >
10
9
</testsuite >
11
- <filter >
12
- <whitelist >
13
- <directory suffix =" .php" >src/</directory >
14
- </whitelist >
15
- </filter >
16
10
</phpunit >
You can’t perform that action at this time.
0 commit comments