File tree Expand file tree Collapse file tree 12 files changed +3583
-863
lines changed Expand file tree Collapse file tree 12 files changed +3583
-863
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ use ApiClients \Tools \CsFixerConfig \PhpCsFixerConfig ;
4
+ use PhpCsFixer \Config ;
5
+
6
+ return (function (): Config
7
+ {
8
+ $ paths = [
9
+ __DIR__ . DIRECTORY_SEPARATOR . 'src ' ,
10
+ __DIR__ . DIRECTORY_SEPARATOR . 'tests ' ,
11
+ __DIR__ . DIRECTORY_SEPARATOR . 'examples ' ,
12
+ ];
13
+
14
+ return PhpCsFixerConfig::create ()
15
+ ->setFinder (
16
+ PhpCsFixer \Finder::create ()
17
+ ->in ($ paths )
18
+ ->append ($ paths )
19
+ )
20
+ ->setUsingCache (false )
21
+ ;
22
+ })();
Original file line number Diff line number Diff line change 1
1
language : php
2
- sudo : false
3
2
4
3
# # Cache composer bits
5
4
cache :
6
5
directories :
7
- - $HOME/.composer/cache
8
-
9
- # # PHP versions we test against
10
- php :
11
- - 7.2
12
- - 7.3
13
- - nightly
14
-
15
- # # Environment variables
16
- env :
17
- - coverage=true
6
+ - $HOME/.composer/cache/files
18
7
19
8
# # Build matrix for lowest and highest possible targets
20
9
matrix :
21
10
include :
11
+ - php : 7.2
12
+ env :
13
+ - qaExtended=true
14
+ - dropPlatform=false
15
+ - php : 7.3
16
+ env :
17
+ - dropPlatform=false
18
+ - php : nightly
19
+ env :
20
+ - dropPlatform=false
22
21
- php : 7.2
23
22
env :
24
23
- dependencies=lowest
25
- - coverage =false
24
+ - dropPlatform =false
26
25
- php : 7.3
27
26
env :
28
27
- dependencies=lowest
29
- - coverage =false
28
+ - dropPlatform =false
30
29
- php : nightly
31
30
env :
32
31
- dependencies=lowest
33
- - coverage =false
32
+ - dropPlatform =false
34
33
- php : 7.2
35
34
env :
36
35
- dependencies=highest
37
- - coverage =false
36
+ - dropPlatform =false
38
37
- php : 7.3
39
38
env :
40
39
- dependencies=highest
41
- - coverage =false
40
+ - dropPlatform =false
42
41
- php : nightly
43
42
env :
44
43
- dependencies=highest
45
- - coverage =false
44
+ - dropPlatform =false
46
45
47
46
# # Install or update dependencies
48
47
install :
49
48
- composer validate
50
- - if [ "$coverage" = "false" ]; then phpenv config-rm xdebug.ini || :; fi;
49
+ - if [ -z "$dropPlatform" ]; then composer config --unset platform.php; fi;
50
+ - if [ -z "$qaExtended" ]; then phpenv config-rm xdebug.ini || :; fi;
51
51
- if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
52
52
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
53
53
- if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
54
54
- composer show
55
55
56
56
# # Run the actual test
57
57
script :
58
- - if [ "$coverage" = "false " ]; then make ci; fi;
59
- - if [ "$coverage " = "true" ]; then make ci-with-coverage ; fi;
58
+ - if [ -z "$qaExtended " ]; then make ci; fi;
59
+ - if [ "$qaExtended " = "true" ]; then make ci-extended ; fi;
60
60
61
61
# # Gather coverage and set it to coverage servers
62
- after_script : make ci-coverage
62
+ after_script : if [ "$qaExtended" = "true" ]; then make ci-coverage; fi;
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ all-coverage:
7
7
ci :
8
8
composer run-script qa-ci --timeout=0
9
9
10
- ci-with-coverage :
11
- composer run-script qa-ci-coverage --timeout=0
10
+ ci-extended :
11
+ composer run-script qa-ci-extended --timeout=0
12
12
13
13
contrib :
14
14
composer run-script qa-contrib --timeout=0
19
19
cs :
20
20
composer cs
21
21
22
- benchmark :
23
- composer benchmark
22
+ cs-fix :
23
+ composer cs-fix
24
24
25
25
unit :
26
26
composer run-script unit --timeout=0
Original file line number Diff line number Diff line change 16
16
"psr/http-message" : " ^1.0"
17
17
},
18
18
"require-dev" : {
19
- "api-clients/test-utilities" : " ^3.0.1" ,
19
+ "api-clients/test-utilities" : " ^3.0.1 || ^5.0.0 " ,
20
20
"ringcentral/psr7" : " ^1.2"
21
21
},
22
22
"autoload" : {
39
39
"ensure-installed" : " composer install --ansi -n -q" ,
40
40
"cs" : [
41
41
" @ensure-installed" ,
42
- " phpcs --standard=PSR2 src/"
42
+ " php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
43
+ ],
44
+ "cs-fix" : [
45
+ " @ensure-installed" ,
46
+ " php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
43
47
],
44
48
"unit" : [
45
49
" @ensure-installed" ,
53
57
" @ensure-installed" ,
54
58
" parallel-lint --exclude vendor ."
55
59
],
56
- "benchmark" : [
57
- " @ensure-installed" ,
58
- " php examples/benchmark.php"
59
- ],
60
60
"qa-all" : [
61
61
" @lint-php" ,
62
62
" @cs" ,
73
73
" @unit"
74
74
],
75
75
"qa-ci" : [
76
- " @qa-all" ,
77
- " @benchmark"
76
+ " @unit"
78
77
],
79
- "qa-ci-coverage" : [
80
- " @qa-all-coverage" ,
81
- " @benchmark"
78
+ "qa-ci-extended" : [
79
+ " @qa-all-coverage"
82
80
],
83
81
"qa-ci-windows" : [
84
- " @qa-windows" ,
85
- " @benchmark"
82
+ " @qa-windows"
86
83
],
87
84
"qa-contrib" : [
88
85
" @qa-all"
You can’t perform that action at this time.
0 commit comments