Skip to content

Commit 29e1d1b

Browse files
author
cradu
committed
Updated deps
1 parent c24d594 commit 29e1d1b

File tree

2 files changed

+109
-15
lines changed

2 files changed

+109
-15
lines changed

.github/workflows/main.yml

Lines changed: 99 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ jobs:
119119
- name: Execute Rector
120120
run: vendor/bin/rector --dry-run
121121

122-
- name: Execute PHP Insights
123-
run: vendor/bin/phpinsights --no-interaction
124122

125123
laravel11-tests:
126124
runs-on: ubuntu-latest
@@ -222,6 +220,103 @@ jobs:
222220
- name: Execute Rector
223221
run: vendor/bin/rector --dry-run
224222

225-
- name: Execute PHP Insights
226-
run: vendor/bin/phpinsights --no-interaction
227223

224+
laravel12-tests:
225+
runs-on: ubuntu-latest
226+
227+
strategy:
228+
matrix:
229+
operating-system: [ ubuntu-latest ]
230+
php: [ '8.2', '8.3', '8.4' ]
231+
dependency-stability: [ 'prefer-stable' ]
232+
233+
laravel: [ '12.*' ]
234+
include:
235+
- laravel: 12.*
236+
testbench: 10.*
237+
238+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}
239+
240+
steps:
241+
- name: Checkout code
242+
uses: actions/checkout@v4
243+
244+
- name: Setup Node.js
245+
uses: actions/setup-node@v4
246+
with:
247+
node-version: '20.x'
248+
249+
- name: Cache node_modules directory
250+
uses: actions/cache@v4
251+
id: node_modules-cache
252+
with:
253+
path: node_modules
254+
key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
255+
256+
- name: Install NPM packages
257+
if: steps.node_modules-cache.outputs.cache-hit != 'true'
258+
run: npm ci --include=dev
259+
260+
- name: Install PHP versions
261+
uses: shivammathur/setup-php@v2
262+
with:
263+
php-version: ${{ matrix.php }}
264+
265+
- name: Get Composer Cache Directory
266+
id: composer-cache
267+
run: |
268+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
269+
270+
- name: Cache Composer dependencies
271+
uses: actions/cache@v4
272+
id: actions-cache
273+
with:
274+
path: ${{ steps.composer-cache.outputs.dir }}
275+
key: ${{ runner.os }}-composer-laravel-11-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
276+
restore-keys: |
277+
${{ runner.os }}-composer-laravel-11-${{ matrix.php }}-
278+
279+
- name: Cache PHP dependencies (vendor)
280+
uses: actions/cache@v4
281+
id: vendor-cache
282+
with:
283+
path: vendor
284+
key: ${{ runner.os }}-build-laravel-11-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
285+
286+
- name: Install Laravel Dependencies
287+
if: steps.vendor-cache.outputs.cache-hit != 'true'
288+
run: |
289+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
290+
composer update --${{ matrix.dependency-stability }} --prefer-dist --no-interaction --no-suggest
291+
292+
- name: Update Dependencies with latest stable
293+
if: matrix.dependency-stability == 'prefer-stable'
294+
run: composer update --prefer-stable
295+
296+
- name: Update Dependencies with lowest stable
297+
if: matrix.dependency-stability == 'prefer-lowest'
298+
run: composer update --prefer-stable --prefer-lowest
299+
300+
- name: Set up Git User
301+
run: |
302+
git config --global user.email "[email protected]"
303+
git config --global user.name "GitHub Actions"
304+
305+
# Code quality
306+
- name: Execute tests (Unit and Feature tests) via PestPHP
307+
shell: 'script -q -e -c "bash {0}"'
308+
# Set environment
309+
env:
310+
SESSION_DRIVER: array
311+
TTY: true
312+
313+
run: vendor/bin/pest
314+
315+
- name: Execute Code Sniffer via Laravel Pint
316+
run: vendor/bin/pint --test src config
317+
318+
- name: Execute PHP Stan
319+
run: vendor/bin/phpstan
320+
321+
- name: Execute Rector
322+
run: vendor/bin/rector --dry-run

composer.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,23 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^8.1",
25-
"illuminate/config": "^10 || ^11",
26-
"illuminate/console": "^10 || ^11",
27-
"illuminate/container": "^10 || ^11",
28-
"illuminate/contracts": "^10 || ^11",
29-
"illuminate/pipeline": "^10 || ^11",
30-
"illuminate/support": "^10 || ^11"
24+
"php": "^8.2",
25+
"illuminate/config": "^10 || ^11 || ^12",
26+
"illuminate/console": "^10 || ^11 || ^12",
27+
"illuminate/container": "^10 || ^11 || ^12",
28+
"illuminate/contracts": "^10 || ^11 || ^12",
29+
"illuminate/pipeline": "^10 || ^11 || ^12",
30+
"illuminate/support": "^10 || ^11 || ^12"
3131
},
3232
"require-dev": {
3333
"enlightn/enlightn": "^2",
34-
"larastan/larastan": "^2",
34+
"larastan/larastan": "^2 || ^3",
3535
"laravel/pint": "^1",
3636
"mockery/mockery": "^1",
37-
"nunomaduro/phpinsights": "^2",
38-
"orchestra/testbench": "^v8 || ^v9",
37+
"orchestra/testbench": "^v8 || ^v9 || ^v10",
3938
"pestphp/pest": "^2 || ^3",
4039
"pestphp/pest-plugin-laravel": "^2 || ^3",
41-
"rector/rector": "^1 || ^2 || ^3",
40+
"rector/rector": "^1 || ^2",
4241
"squizlabs/php_codesniffer": "^3"
4342
},
4443
"autoload": {

0 commit comments

Comments
 (0)