1- name : Tests
1+ name : run-tests
22
33on :
44 push :
5- branches : [ main, master ]
5+ branches :
6+ - ' *'
67 pull_request :
7- branches : [ main, master ]
8- schedule :
9- - cron : ' 0 0 * * *' # Run daily at midnight
10-
11- env :
12- COMPOSER_PROCESS_TIMEOUT : 0
13- COMPOSER_NO_INTERACTION : 1
14- COMPOSER_NO_AUDIT : 1
8+ branches :
9+ - ' *'
1510
1611jobs :
17- tests :
12+ run- tests :
1813 runs-on : ubuntu-latest
19-
14+ timeout-minutes : 15
15+ env :
16+ COMPOSER_NO_INTERACTION : 1
2017 strategy :
2118 fail-fast : false
2219 matrix :
23- php : [8.2, 8.3, 8.4]
24- laravel : [11.*, 12.*]
25- stability : [prefer-lowest, prefer-stable]
26- exclude :
27- # Skip incompatible PHP versions and Laravel versions
28- - php : 8.2
29- laravel : 12.*
30- - php : 8.4
31- stability : prefer-lowest
20+ php : [ 8.2, 8.3, 8.4 ]
21+ laravel : [ 11.*, 12.* ]
22+ include :
23+ - laravel : 12.*
24+ testbench : 10.*
25+ - laravel : 11.*
26+ testbench : 9.*
3227
33- name : PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}
28+ name : PHP${{ matrix.php }} - Laravel${{ matrix.laravel }} - ${{ matrix.dependency-version }}
3429
3530 steps :
3631 - name : Checkout code
@@ -40,41 +35,15 @@ jobs:
4035 uses : shivammathur/setup-php@v2
4136 with :
4237 php-version : ${{ matrix.php }}
43- extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl
44- coverage : xdebug
45- ini-values : memory_limit=256M
46- tools : composer:v2
47-
48- - name : Setup problem matchers
49- run : echo "::add-matcher::/opt/hostedtoolcache/php.json" && echo "::add-matcher::/opt/hostedtoolcache/phpunit.json"
50-
51- - name : Get composer cache directory
52- id : composer-cache
53- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
54-
55- - name : Cache dependencies
56- uses : actions/cache@v4
57- with :
58- path : ${{ steps.composer-cache.outputs.dir }}
59- key : ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}-${{ matrix.stability }}
60- restore-keys : |
61- ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}-
62- ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-
63-
64- - name : Update testbench for Laravel 12
65- if : matrix.laravel == '12.*'
66- run : composer require --no-update "orchestra/testbench:^10.0" --dev
67-
68- - name : Update testbench for Laravel 11
69- if : matrix.laravel == '11.*'
70- run : composer require --no-update "orchestra/testbench:^9.0" --dev
38+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
39+ coverage : none
7140
7241 - name : Install dependencies
73- run : composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update && composer update --${{ matrix.stability }} --prefer-dist --no-interaction
74-
75- - name : Run PHPUnit tests
76- run : vendor/bin/phpunit -c "$(pwd)/phpunit.xml"
77-
78- - name : Run PHP Static Analysis
79- if : ${{ matrix.stability == 'prefer-stable' }}
80- run : vendor/bin/phpstan analyse
42+ run : |
43+ composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/database:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" --no-update
44+ composer require "orchestra/testbench:${{ matrix.testbench }}" --dev --no-update
45+ composer update --prefer-dist --no-suggest
46+
47+ - name : Execute tests
48+ run : |
49+ vendor/bin/phpunit
0 commit comments