File tree Expand file tree Collapse file tree 3 files changed +58
-13
lines changed Expand file tree Collapse file tree 3 files changed +58
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : ' CI'
2
+
3
+ on :
4
+ - ' push'
5
+ - ' pull_request'
6
+
7
+ jobs :
8
+ tests :
9
+ name : ' Tests'
10
+
11
+ runs-on : ' ubuntu-latest'
12
+
13
+ strategy :
14
+ matrix :
15
+ include :
16
+ - php-version : ' 7.1'
17
+ composer-options : ' --prefer-stable'
18
+ - php-version : ' 7.1'
19
+ composer-options : ' --prefer-lowest --prefer-stable'
20
+ - php-version : ' 7.2'
21
+ composer-options : ' --prefer-stable'
22
+ - php-version : ' 7.3'
23
+ composer-options : ' --prefer-stable'
24
+
25
+ steps :
26
+ - name : ' Check out'
27
+ uses : ' actions/checkout@v2'
28
+
29
+ - name : ' Set up PHP'
30
+ uses : ' shivammathur/setup-php@v2'
31
+ with :
32
+ php-version : ' ${{ matrix.php-version }}'
33
+ coverage : ' none'
34
+
35
+ - name : ' Get Composer cache directory'
36
+ id : ' composer-cache'
37
+ run : ' echo "::set-output name=cache-dir::$(composer config cache-files-dir)"'
38
+
39
+ - name : ' Cache dependencies'
40
+ uses : ' actions/cache@v2'
41
+ with :
42
+ path : ' ${{ steps.composer-cache.outputs.cache-dir }}'
43
+ key : " php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
44
+ restore-keys : ' php-${{ matrix.php-version }}-composer-locked-'
45
+
46
+ - name : ' Install dependencies'
47
+ run : ' composer update --no-progress $COMPOSER_OPTIONS'
48
+
49
+ - name : ' Install PHPUnit'
50
+ run : ' vendor/bin/simple-phpunit install'
51
+
52
+ - name : ' Run PhpSpec'
53
+ run : ' vendor/bin/phpspec run'
54
+
55
+ - name : ' Run PHPUnit'
56
+ run : ' SYMFONY_DEPRECATIONS_HELPER=weak vendor/bin/simple-phpunit'
Original file line number Diff line number Diff line change 1
- sudo : false
2
-
3
1
language : php
4
2
5
- cache :
6
- directories :
7
- - $HOME/.composer/cache/files
8
-
9
3
env :
10
4
global :
11
5
- deps=""
@@ -23,17 +17,11 @@ matrix:
23
17
- php : 7.2
24
18
- php : 7.3
25
19
26
- before_install :
27
- - if [[ "$xdebug" != "yes" ]]; then phpenv config-rm xdebug.ini; fi
28
- - composer self-update
29
- - composer require 'phpunit/phpunit:^4.8.35|^5.4.3|^6.0' --dev --no-update
30
-
31
20
install :
32
21
- if [ "$PACKAGES" != "" ]; then composer require --no-update $PACKAGES; fi
33
22
- composer update $COMPOSER_OPTIONS
34
23
35
24
script :
36
- - vendor/bin/phpspec run
37
25
- if [[ "$xdebug" = "yes" ]]; then vendor/bin/phpunit --coverage-clover=coverage.clover; else vendor/bin/phpunit; fi
38
26
- if [[ "$xdebug" = "yes" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
39
27
- if [[ "$xdebug" = "yes" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
Original file line number Diff line number Diff line change 28
28
"require-dev" : {
29
29
"phpspec/phpspec" : " ^2.4" ,
30
30
"php-http/mock-client" : " ^1.2" ,
31
- "php-xapi/test-fixtures" : " ^1.0"
31
+ "php-xapi/test-fixtures" : " ^1.0" ,
32
+ "symfony/phpunit-bridge" : " ^5.2"
32
33
},
33
34
"minimum-stability" : " dev" ,
34
35
"suggest" : {
You can’t perform that action at this time.
0 commit comments