File tree Expand file tree Collapse file tree 1 file changed +29
-31
lines changed Expand file tree Collapse file tree 1 file changed +29
-31
lines changed Original file line number Diff line number Diff line change 1
- name : CI
1
+ name : " testing "
2
2
3
- on : [push]
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
4
8
5
9
jobs :
6
- build :
7
- runs-on : ${{ matrix.operating-system }}
10
+ tests :
11
+ name : Tests
12
+ runs-on : ubuntu-latest
13
+
8
14
strategy :
9
15
matrix :
10
- operating-system : [ubuntu-latest]
11
- php-versions : ["7.2", "7.3", "7.4", 8.0"]
12
- env :
13
- tools : composer
14
- name : PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}
16
+ php :
17
+ - 7.2
18
+ - 7.3
19
+ - 7.4
20
+ composer-args : [ "" ]
21
+ include :
22
+ - php : 8.0
23
+ composer-args : --ignore-platform-reqs
24
+ fail-fast : false
25
+
15
26
steps :
16
27
- name : Checkout
17
28
uses : actions/checkout@v2
18
29
19
- - name : Setup PHP
30
+ - name : Install PHP
20
31
uses : shivammathur/setup-php@v2
21
32
with :
22
- php-version : ${{ matrix.php-versions }}
23
- tools : ${{ env.tools }}
24
- env :
25
- fail-fast : true
26
-
27
- - name : Setup problem matchers for PHPUnit
28
- run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
29
-
30
- - name : Validate composer
31
- run : composer validate
32
-
33
- - name : Get composer cache directory
34
- id : composer-cache
35
- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
33
+ php-version : ${{ matrix.php }}
36
34
37
- - name : Cache dependencies
35
+ - name : Cache PHP dependencies
38
36
uses : actions/cache@v2
39
37
with :
40
- path : ${{ steps.composer-cache.outputs.dir }}
41
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock ') }}
42
- restore-keys : ${{ runner.os }}-composer-
38
+ path : vendor
39
+ key : ${{ runner.os }}-php-${{ matrix.php }}- composer-${{ hashFiles('**/composer.json ') }}
40
+ restore-keys : ${{ runner.os }}-php-${{ matrix.php }}- composer-
43
41
44
42
- name : Install dependencies
45
- run : composer install
43
+ run : composer install --prefer-dist --no-progress --no-suggest ${{ matrix.composer-args }}
46
44
47
- - name : Run tests
48
- run : composer test
45
+ - name : Tests
46
+ run : composer test
You can’t perform that action at this time.
0 commit comments