Skip to content

Commit 6dbee76

Browse files
authored
Merge pull request #2 from descom-es/laravel_11_tests
Add Support to Laravel 11
2 parents d8cc507 + cdf6708 commit 6dbee76

File tree

4 files changed

+77
-62
lines changed

4 files changed

+77
-62
lines changed

.github/workflows/analyze.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: analyze
1+
name: Analyse
22

33
on:
44
push:
@@ -8,25 +8,25 @@ on:
88

99
jobs:
1010
phpstan:
11-
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v4
14+
- name: Checkout code
15+
uses: actions/checkout@v4
1616

1717
- name: Setup PHP
1818
uses: shivammathur/setup-php@v2
1919
with:
20-
php-version: 8.2
20+
php-version: 8.3
2121

2222
- name: Cache Composer packages
2323
id: composer-cache
24-
uses: actions/cache@v3
24+
uses: actions/cache@v4
2525
with:
2626
path: vendor
27-
key: ${{ runner.os }}-php-8.2
27+
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.json') }}
2828
restore-keys: |
29-
${{ runner.os }}-php-8.2
29+
${{ runner.os }}-php-8.3-
3030
3131
- name: Install dependencies
3232
if: steps.composer-cache.outputs.cache-hit != 'true'

.github/workflows/style_fix.yml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
1-
name: style_fix
1+
name: Style fix
22

33
on:
44
push:
55
branches: [master]
6-
pull_request:
7-
branches: [master]
86

97
jobs:
10-
style:
11-
8+
style-fix:
129
runs-on: ubuntu-latest
1310

1411
steps:
15-
- uses: actions/checkout@v4
16-
17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: '8.1'
21-
22-
- name: Install dependencies
23-
run: |
24-
composer install --no-interaction --no-progress
25-
composer dump
26-
27-
- name: Fix styles
28-
run: vendor/bin/php-cs-fixer fix
29-
30-
- uses: EndBug/add-and-commit@v9
31-
32-
- name: Run style
33-
run: vendor/bin/php-cs-fixer fix --dry-run --diff --format junit
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: 8.3
19+
20+
- name: Cache Composer packages
21+
id: composer-cache
22+
uses: actions/cache@v4
23+
with:
24+
path: vendor
25+
key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-php-8.3-
28+
29+
- name: Install dependencies
30+
if: steps.composer-cache.outputs.cache-hit != 'true'
31+
run: |
32+
composer install --no-interaction --no-progress
33+
composer dump
34+
35+
- name: Fix styles
36+
run: vendor/bin/php-cs-fixer fix
37+
38+
- name: Run style
39+
run: vendor/bin/php-cs-fixer fix --dry-run --diff --format junit
40+
41+
- uses: EndBug/add-and-commit@v9

.github/workflows/tests.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: tests
1+
name: Tests
22

33
on:
44
push:
@@ -8,32 +8,39 @@ on:
88

99
jobs:
1010
phpunit:
11-
1211
runs-on: ubuntu-latest
1312

1413
strategy:
14+
fail-fast: true
1515
matrix:
16-
php-versions: ['8.2', '8.1']
17-
laravel: [9.*, 10.*]
18-
include:
19-
- laravel: 9.*
20-
testbench: 7.*
21-
- laravel: 10.*
22-
testbench: 8.*
16+
php: [8.1, 8.2, 8.3]
2317

2418
steps:
25-
- uses: actions/checkout@v4
26-
27-
- name: Setup PHP
28-
uses: shivammathur/setup-php@v2
29-
with:
30-
php-version: ${{ matrix.php-versions }}
31-
extensions: curl
32-
33-
- name: Install dependencies
34-
run: |
35-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
36-
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest
37-
38-
- name: Run test phpunit
39-
run: vendor/bin/phpunit
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
27+
- name: Validate composer.json
28+
run: composer validate
29+
30+
- name: Cache Composer packages
31+
id: composer-cache
32+
uses: actions/cache@v4
33+
with:
34+
path: vendor
35+
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-php-${{ matrix.php }}-
38+
39+
- name: Install dependencies
40+
if: steps.composer-cache.outputs.cache-hit != 'true'
41+
run: |
42+
composer install --no-interaction --no-progress
43+
composer dump
44+
45+
- name: Run test phpunit
46+
run: vendor/bin/phpunit --stop-on-error --stop-on-failure

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
"require": {
1313
"php": "^8.1",
1414
"aws/aws-php-sns-message-validator": "^1.1",
15-
"illuminate/config": "^9.0|^10.0",
16-
"illuminate/http": "^9.0|^10.0",
17-
"illuminate/routing": "^9.0|^10.0",
18-
"illuminate/support": "^9.0|^10.0"
15+
"illuminate/config": "^9.0|^10.0|^11.0",
16+
"illuminate/http": "^9.0|^10.0|^11.0",
17+
"illuminate/routing": "^9.0|^10.0|^11.0",
18+
"illuminate/support": "^9.0|^10.0|^11.0"
1919
},
2020
"require-dev": {
2121
"descom/dev": "^1.0",
2222
"friendsofphp/php-cs-fixer": "^3.4",
2323
"nunomaduro/larastan": "^2.0",
24-
"orchestra/testbench": "^7.5|^8.0",
24+
"orchestra/testbench": "^7.5|^8.0|^9.0",
2525
"phpstan/phpstan": "^1.2",
26-
"phpunit/phpunit": "^9.3"
26+
"phpunit/phpunit": "^9.3|^10.0|^10.5"
2727
},
2828
"autoload": {
2929
"psr-4": {
@@ -50,4 +50,4 @@
5050
},
5151
"minimum-stability": "dev",
5252
"prefer-stable": true
53-
}
53+
}

0 commit comments

Comments
 (0)