44 pull_request :
55 branches :
66 - ' develop'
7+ - ' development'
78 - ' master'
89
910jobs :
10- test :
11+ test-laravel10 :
1112 runs-on : ${{ matrix.os }}
1213 strategy :
1314 fail-fast : false
15+ max-parallel : 3
1416 matrix :
1517 os : [ubuntu-latest]
1618 php : [8.1, 8.2, 8.3]
17- laravel : [10.*,11.* ]
19+ laravel : [10.*]
1820 stability : [prefer-dist]
19- exclude :
20- - laravel : 11.*
21- php : 8.1
2221
23- name : STD- PULL - ${{ matrix.os }} - P${{ matrix. php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
22+ name : PULL PHP- ${{ matrix.php }} - Laravel-10
2423 env :
25- extensionKey : phpextensions-${{ matrix.os }}-P${{ matrix.php }}
24+ extensionKey : phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L{{ matrix.laravel }}
2625 extensions : dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr
2726
2827 steps :
2928 - name : Checkout code
30- uses : actions/checkout@v3
29+ uses : actions/checkout@v4
3130
3231 - name : Setup cache environment
3332 id : extcache
3433 uses : shivammathur/cache-extensions@v1
3534 with :
3635 php-version : ${{ matrix.php }}
3736 extensions : ${{ env.extensions }}
38- key : ${{ runner.os }}-${{ env.extensionKey }}
37+ key : ${{ env.extensionKey }}
3938
4039 - name : Cache extensions
41- uses : actions/cache@v3
40+ uses : actions/cache@v4
4241 with :
4342 path : ${{ steps.extcache.outputs.dir }}
44- key : ${{ steps.extcache.outputs.key }}
45- restore-keys : ${{ steps.extcache.outputs.key }}
43+ key : ${{ runner.os }}-${{ steps.extcache.outputs.key }}
44+ restore-keys : ${{ runner.os }}-${{ steps.extcache.outputs.key }}
4645
4746 - name : Setup PHP
4847 uses : shivammathur/setup-php@v2
@@ -63,11 +62,11 @@ jobs:
6362 run : |
6463 echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
6564
66- - uses : actions/cache@v3
65+ - uses : actions/cache@v4
6766 with :
6867 path : ${{ steps.composer-cache.outputs.dir }}
69- key : ${{ runner.os }}-STDPULL -PHP- ${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
70- restore-keys : ${{ runner.os }}-STDPULL -PHP- ${{ matrix.php }}-L${{ matrix.laravel }}-composer-
68+ key : ${{ runner.os }}-STDPUSH -PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
69+ restore-keys : ${{ runner.os }}-STDPUSH -PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
7170
7271 - name : Add token
7372 run : |
7877 run : composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update
7978
8079 - name : Update dependencies
80+ if : steps.composer-cache.outputs.cache-hit != 'true'
8181 run : composer update --${{ matrix.stability }} --no-interaction
8282
83+ - name : Setup problem matchers for PHPUnit
84+ run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
85+
86+ - name : Run Unit Tests
87+ run : php ./vendor/bin/paratest --no-coverage --processes=4
88+
89+
90+ test-laravel11 :
91+ runs-on : ${{ matrix.os }}
92+ strategy :
93+ fail-fast : false
94+ max-parallel : 2
95+ matrix :
96+ os : [ubuntu-latest]
97+ php : [8.2, 8.3]
98+ laravel : [11.*]
99+ stability : [prefer-dist]
100+
101+ name : PULL PHP-${{ matrix.php }} - Laravel-11
102+ env :
103+ extensionKey : phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L{{ matrix.laravel }}
104+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr
105+
106+ steps :
107+ - name : Checkout code
108+ uses : actions/checkout@v4
109+
110+ - name : Setup cache environment
111+ id : extcache
112+ uses : shivammathur/cache-extensions@v1
113+ with :
114+ php-version : ${{ matrix.php }}
115+ extensions : ${{ env.extensions }}
116+ key : ${{ env.extensionKey }}
117+
118+ - name : Cache extensions
119+ uses : actions/cache@v4
120+ with :
121+ path : ${{ steps.extcache.outputs.dir }}
122+ key : ${{ runner.os }}-${{ steps.extcache.outputs.key }}
123+ restore-keys : ${{ runner.os }}-${{ steps.extcache.outputs.key }}
124+
125+ - name : Setup PHP
126+ uses : shivammathur/setup-php@v2
127+ with :
128+ php-version : ${{ matrix.php }}
129+ extensions : ${{ env.extensions }}
130+ tools : phpunit:latest
131+ ini-values : memory_limit=512M
132+ coverage : none
133+ env :
134+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
135+
136+ - name : Setup problem matchers for PHP
137+ run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
138+
139+ - name : Get composer cache directory
140+ id : composer-cache
141+ run : |
142+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
143+
144+ - uses : actions/cache@v4
145+ with :
146+ path : ${{ steps.composer-cache.outputs.dir }}
147+ key : ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
148+ restore-keys : ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
149+
150+ - name : Add token
151+ run : |
152+ composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
153+
154+ - name : Install dependencies
155+ if : steps.composer-cache.outputs.cache-hit != 'true'
156+ run : composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update
157+
158+ - name : Update dependencies
159+ if : steps.composer-cache.outputs.cache-hit != 'true'
160+ run : composer update --${{ matrix.stability }} --no-interaction
161+
162+ - name : Setup problem matchers for PHPUnit
163+ run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
164+
83165 - name : Run Unit Tests
84166 run : php ./vendor/bin/paratest --no-coverage --processes=4
0 commit comments