-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.84 KB
/
Copy pathtest.yml
File metadata and controls
63 lines (51 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Run Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4', '8.5']
laravel: ['11.*', '12.*', '13.*']
exclude:
# Laravel 11 constraints (PHP 8.2 - 8.4)
- laravel: '11.*'
php: '8.5'
# Laravel 13 constraints (PHP 8.3+)
- laravel: '13.*'
php: '8.2'
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, json, libxml, mbstring
coverage: none
- name: Install dependencies
run: |
if [ "${{ matrix.php }}" != "8.2" ] || [ "${{ matrix.laravel }}" != "11.*" ]; then
composer remove --dev vimeo/psalm phpstan/phpstan laravel/pint rector/rector --no-interaction --no-update
fi
composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-progress --no-security-blocking
- name: Validate composer.json
run: composer validate
- name: Run PHPUnit tests
run: vendor/bin/phpunit
- name: Run PHPStan analysis
if: matrix.php == '8.2' && matrix.laravel == '11.*'
run: vendor/bin/phpstan analyse
- name: Run Psalm analysis
if: matrix.php == '8.2' && matrix.laravel == '11.*'
run: vendor/bin/psalm --no-cache
- name: Check Pint code style
if: matrix.php == '8.2' && matrix.laravel == '11.*'
run: vendor/bin/pint --test