File tree Expand file tree Collapse file tree 5 files changed +130
-28
lines changed Expand file tree Collapse file tree 5 files changed +130
-28
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ use ApiClients \Tools \TestUtilities \PhpCsFixerConfig ;
4
+
5
+ return (function ()
6
+ {
7
+ $ path = __DIR__ . DIRECTORY_SEPARATOR . 'src ' ;
8
+
9
+ return PhpCsFixerConfig::create ()
10
+ ->setFinder (
11
+ PhpCsFixer \Finder::create ()
12
+ ->in ($ path )
13
+ ->append ([$ path ])
14
+ )
15
+ ->setUsingCache (false )
16
+ ;
17
+ })();
Original file line number Diff line number Diff line change 5
5
directories :
6
6
- $HOME/.composer/cache/files
7
7
8
- # # PHP versions we test against
9
- php :
10
- - 7.0
11
- - 7.1
12
- - nightly
13
-
14
8
# # Build matrix for lowest and highest possible targets
15
9
matrix :
16
10
include :
17
11
- php : 7.0
18
- env : dependencies=lowest
12
+ env :
13
+ - qaExtended=true
14
+ - php : 7.1
15
+ - php : nightly
16
+ env :
17
+ - dropPlatform=false
18
+ - php : 7.0
19
+ env :
20
+ - dependencies=lowest
19
21
- php : 7.1
20
- env : dependencies=lowest
22
+ env :
23
+ - dependencies=lowest
21
24
- php : nightly
22
- env : dependencies=lowest
25
+ env :
26
+ - dependencies=lowest
27
+ - dropPlatform=false
23
28
- php : 7.0
24
- env : dependencies=highest
29
+ env :
30
+ - dependencies=highest
25
31
- php : 7.1
26
- env : dependencies=highest
32
+ env :
33
+ - dependencies=highest
27
34
- php : nightly
28
- env : dependencies=highest
35
+ env :
36
+ - dependencies=highest
37
+ - dropPlatform=false
29
38
30
39
# # Install or update dependencies
31
40
install :
41
+ - composer validate
42
+ - if [ -z "$dropPlatform" ]; then composer config --unset platform.php; fi;
43
+ - if [ -z "$qaExtended" ]; then phpenv config-rm xdebug.ini || :; fi;
32
44
- if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
33
45
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
34
46
- if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
35
47
- composer show
36
48
37
49
# # Run the actual test
38
- script : make travis
50
+ script :
51
+ - if [ -z "$qaExtended" ]; then make ci; fi;
52
+ - if [ "$qaExtended" = "true" ]; then make ci-extended; fi;
39
53
40
54
# # Gather coverage and set it to coverage servers
41
- after_script : make travis -coverage
55
+ after_script : if [ "$qaExtended" = "true" ]; then make ci -coverage; fi;
Original file line number Diff line number Diff line change 1
- all : cs unit
2
- travis : cs travis-unit
3
- contrib : cs unit
1
+ all :
2
+ composer run-script qa-all --timeout=0
3
+
4
+ all-coverage :
5
+ composer run-script qa-all-coverage --timeout=0
6
+
7
+ ci :
8
+ composer run-script qa-ci --timeout=0
9
+
10
+ ci-extended :
11
+ composer run-script qa-ci-extended --timeout=0
12
+
13
+ contrib :
14
+ composer run-script qa-contrib --timeout=0
4
15
5
16
init :
6
- if [ ! -d vendor ]; then composer install; fi ;
17
+ composer ensure-installed
18
+
19
+ cs :
20
+ composer cs
7
21
8
- cs : init
9
- ./vendor/bin/phpcs --standard=PSR2 src/
22
+ cs-fix :
23
+ composer cs-fix
10
24
11
- unit : init
12
- ./vendor/bin/phpunit --coverage-text --coverage-html covHtml
25
+ unit :
26
+ composer run-script unit --timeout=0
13
27
14
- travis- unit: init
15
- ./vendor/bin/phpunit - -coverage-text --coverage-clover ./build/logs/clover.xml
28
+ unit-coverage :
29
+ composer run-script unit -coverage --timeout=0
16
30
17
- travis -coverage : init
18
- if [ -f ./build/logs/clover.xml ] ; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code -coverage:upload --format=php-clover ./build/logs/clover.xml ; fi
31
+ ci -coverage : init
32
+ composer ci -coverage
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ install:
44
44
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
45
45
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
46
46
- cd c:\projects\php-project-workspace
47
+ - composer config --unset platform.php
47
48
- IF %dependencies%==lowest appveyor-retry composer update --prefer-lowest --no-progress --profile -n
48
49
- IF %dependencies%==current appveyor-retry composer install --no-progress --profile
49
50
- IF %dependencies%==highest appveyor-retry composer update --no-progress --profile -n
Original file line number Diff line number Diff line change 18
18
"rx/websocket" : " ^1.0"
19
19
},
20
20
"require-dev" : {
21
- "api-clients/test-utilities" : " ^2.0 "
21
+ "api-clients/test-utilities" : " ^4.1 "
22
22
},
23
23
"autoload" : {
24
24
"psr-4" : {
31
31
}
32
32
},
33
33
"config" : {
34
- "sort-packages" : true
34
+ "sort-packages" : true ,
35
+ "platform" : {
36
+ "php" : " 7.0"
37
+ }
35
38
},
36
39
"extra" : {
37
40
"api-clients" : {
40
43
"namespace" : " ApiClients\\ Client\\ Pusher\\ CommandBus"
41
44
}
42
45
}
46
+ },
47
+ "scripts" : {
48
+ "ensure-installed" : " composer install --ansi -n -q" ,
49
+ "cs" : [
50
+ " @ensure-installed" ,
51
+ " php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
52
+ ],
53
+ "cs-fix" : [
54
+ " @ensure-installed" ,
55
+ " php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
56
+ ],
57
+ "unit" : [
58
+ " @ensure-installed" ,
59
+ " phpunit --colors=always -c phpunit.xml.dist"
60
+ ],
61
+ "unit-coverage" : [
62
+ " @ensure-installed" ,
63
+ " phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml --coverage-clover ./build/logs/clover.xml"
64
+ ],
65
+ "lint-php" : [
66
+ " @ensure-installed" ,
67
+ " parallel-lint --exclude vendor ."
68
+ ],
69
+ "qa-all" : [
70
+ " @lint-php" ,
71
+ " @cs" ,
72
+ " @unit"
73
+ ],
74
+ "qa-all-coverage" : [
75
+ " @lint-php" ,
76
+ " @cs" ,
77
+ " @unit-coverage"
78
+ ],
79
+ "qa-windows" : [
80
+ " @lint-php" ,
81
+ " @cs" ,
82
+ " @unit"
83
+ ],
84
+ "qa-ci" : [
85
+ " @unit"
86
+ ],
87
+ "qa-ci-extended" : [
88
+ " @qa-all-coverage"
89
+ ],
90
+ "qa-ci-windows" : [
91
+ " @qa-windows"
92
+ ],
93
+ "qa-contrib" : [
94
+ " @qa-all"
95
+ ],
96
+ "ci-coverage" : [
97
+ " if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi"
98
+ ]
43
99
}
44
100
}
You can’t perform that action at this time.
0 commit comments