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 "
22
3- on : [push]
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
48
59jobs :
6- build :
7- runs-on : ${{ matrix.operating-system }}
10+ tests :
11+ name : Tests
12+ runs-on : ubuntu-latest
13+
814 strategy :
915 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+
1526 steps :
1627 - name : Checkout
1728 uses : actions/checkout@v2
1829
19- - name : Setup PHP
30+ - name : Install PHP
2031 uses : shivammathur/setup-php@v2
2132 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 }}
3634
37- - name : Cache dependencies
35+ - name : Cache PHP dependencies
3836 uses : actions/cache@v2
3937 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-
4341
4442 - name : Install dependencies
45- run : composer install
43+ run : composer install --prefer-dist --no-progress --no-suggest ${{ matrix.composer-args }}
4644
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