1- name : " Run Tests "
1+ name : run-tests
22
33on :
44 push :
88
99jobs :
1010 test :
11- runs-on : ${{ matrix.os }}
11+ runs-on : ubuntu-latest
1212 strategy :
1313 fail-fast : true
1414 matrix :
15- os : [ubuntu-latest, windows-latest]
16- php : [8.4, 8.3, 8.2]
17- laravel : [12.*, 11.*]
18- stability : [prefer-lowest, prefer-stable]
1915 include :
20- - laravel : 12.*
21- testbench : 10.*
22- carbon : 3.*
23- collision : 8.*
24- - laravel : 11.*
16+ - php : 8.2
17+ laravel : 11.*
18+ filament : 4.*
2519 testbench : 9.*
26- carbon : 3.*
27- collision : 8.*
20+ livewire : ^3.0
21+ pest : ^3.8
22+ pest_plugin_arch : ^3.1
23+ pest_plugin_laravel : ^3.1
24+ pest_plugin_livewire : ^3.1
25+ - php : 8.2
26+ laravel : 12.*
27+ filament : 4.*
28+ testbench : 10.*
29+ livewire : ^3.0
30+ pest : ^3.8
31+ pest_plugin_arch : ^3.1
32+ pest_plugin_laravel : ^3.1
33+ pest_plugin_livewire : ^3.1
34+ - php : 8.3
35+ laravel : 12.*
36+ filament : 5.*
37+ testbench : 10.*
38+ livewire : ^4.0
39+ pest : ^4.0
40+ pest_plugin_arch : ^4.0
41+ pest_plugin_laravel : ^4.0
42+ pest_plugin_livewire : ^4.0
43+ - php : 8.4
44+ laravel : 12.*
45+ filament : 5.*
46+ testbench : 10.*
47+ livewire : ^4.0
48+ pest : ^4.0
49+ pest_plugin_arch : ^4.0
50+ pest_plugin_laravel : ^4.0
51+ pest_plugin_livewire : ^4.0
52+ - php : 8.5
53+ laravel : 12.*
54+ filament : 5.*
55+ testbench : 10.*
56+ livewire : ^4.0
57+ pest : ^4.0
58+ pest_plugin_arch : ^4.0
59+ pest_plugin_laravel : ^4.0
60+ pest_plugin_livewire : ^4.0
2861
29- name : P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
62+ name : P${{ matrix.php }} - L${{ matrix.laravel }}
3063
3164 steps :
3265 - name : Checkout code
33- uses : actions/checkout@v5
66+ uses : actions/checkout@v4
67+
68+ - name : Validate composer.json and composer.lock
69+ run : composer validate --strict
70+
71+ - name : Cache Composer dependencies
72+ uses : actions/cache@v4
73+ with :
74+ path : vendor
75+ key : ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.filament }}-${{ matrix.testbench }}-${{ matrix.livewire }}-${{ hashFiles('**/composer.lock') }}
76+ restore-keys : |
77+ ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.filament }}-${{ matrix.testbench }}-${{ matrix.livewire }}-
78+ ${{ runner.os }}-composer-
3479
3580 - name : Setup PHP
3681 uses : shivammathur/setup-php@v2
3782 with :
3883 php-version : ${{ matrix.php }}
39- extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
40- coverage : none
84+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, pcov
85+ coverage : pcov
4186
4287 - name : Setup problem matchers
4388 run : |
4489 echo "::add-matcher::${{ runner.tool_cache }}/php.json"
4590 echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
4691
4792 - name : Install dependencies
93+ env :
94+ XDEBUG_MODE : off
4895 run : |
49- composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
50- composer update --${{ matrix.stability }} --prefer-dist --no-interaction
96+ composer require \
97+ "laravel/framework:${{ matrix.laravel }}" \
98+ "orchestra/testbench:${{ matrix.testbench }}" \
99+ "filament/filament:${{ matrix.filament }}" \
100+ "livewire/livewire:${{ matrix.livewire }}" \
101+ "pestphp/pest:${{ matrix.pest }}" \
102+ "pestphp/pest-plugin-arch:${{ matrix.pest_plugin_arch }}" \
103+ "pestphp/pest-plugin-laravel:${{ matrix.pest_plugin_laravel }}" \
104+ "pestphp/pest-plugin-livewire:${{ matrix.pest_plugin_livewire }}" \
105+ --no-interaction --no-update --no-progress --ansi
106+ composer update --prefer-stable --prefer-dist --no-interaction --no-progress --ansi
107+
108+ - name : Prepare coverage directory
109+ run : mkdir -p build/logs
51110
52- - name : List Installed Dependencies
53- run : composer show -D
111+ - name : Execute tests with coverage
112+ run : vendor/bin/pest --coverage --coverage-clover build/logs/clover.xml
54113
55- - name : Execute tests
56- run : vendor/bin/pest --ci
114+ - name : Sanitize artifact name
115+ run : |
116+ LARAVEL_SAFE=$(echo "${{ matrix.laravel }}" | tr '*' 'x')
117+ FILAMENT_SAFE=$(echo "${{ matrix.filament }}" | tr '*' 'x')
118+ echo "ARTIFACT_NAME=coverage-${{ matrix.php }}-${LARAVEL_SAFE}-${FILAMENT_SAFE}" >> $GITHUB_ENV
119+
120+ - name : Upload coverage artifact
121+ uses : actions/upload-artifact@v4
122+ with :
123+ name : ${{ env.ARTIFACT_NAME }}
124+ path : build/logs/clover.xml
125+ if-no-files-found : error
0 commit comments