File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed
Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change 11name : PHP Composer
22
3- on :
4- push :
5- branches : [ "master" ]
6- pull_request :
7- branches : [ "master" ]
3+ on : [push, pull_request]
84
95permissions :
106 contents : read
117
128jobs :
139 build :
1410
15- runs-on : ubuntu-latest
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [ ubuntu-latest ]
16+ php : [ 8.1, 8.2, 8.3 ]
17+ dependency-version : [ prefer-stable ]
18+
19+ name : PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
1620
1721 steps :
18- - uses : actions/checkout@v3
22+ - uses : actions/checkout@v4
1923
2024 - name : Setup PHP
2125 uses : shivammathur/setup-php@v2
2226 with :
23- php-version : ' 8.1 '
27+ php-version : ${{ matrix.php }}
2428 extensions : xdebug
2529 ini-values : xdebug.mode="coverage"
2630 coverage : xdebug
2731
2832 - name : Validate composer.json and composer.lock
2933 run : composer validate --strict
3034
31- - name : Cache Composer packages
35+ - name : Get Composer cache directory
3236 id : composer-cache
37+ run : |
38+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
39+
40+ - name : Cache Composer packages
3341 uses : actions/cache@v3
3442 with :
35- path : vendor
36- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
37- restore-keys : |
38- ${{ runner.os }}-php-
43+ path : ${{ steps.composer-cache.outputs.dir }}
44+ key : dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
3945
4046 - name : Install dependencies
4147 run : composer install --prefer-dist --no-progress
4854 with :
4955 token : ${{ secrets.CODECOV_TOKEN }}
5056 files : ./coverage.xml
51- flags : unittests
52- name : starter-codecov
5357 fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments