Skip to content

Commit afc690d

Browse files
L12 compatibility (#81)
This pull request includes updates to the workflow configuration and dependency management to support newer versions of PHP and Laravel, as well as improvements to the test execution process. ### Workflow Configuration Updates: * [`.github/workflows/run-tests.yml`](diffhunk://#diff-7314d0ebbd2e9537ae4889316745b4fd2fa43cb86275c9caae18a86ba228b642L7-R47): Updated the PHP and Laravel versions matrix to include PHP 8.4 and Laravel ^12.0. The matrix now also includes an option to run tests with or without coverage. * [`.github/workflows/run-tests.yml`](diffhunk://#diff-7314d0ebbd2e9537ae4889316745b4fd2fa43cb86275c9caae18a86ba228b642R67-R77): Modified the test execution steps to conditionally run tests with or without coverage based on the matrix configuration. ### Dependency Management Updates: * [`composer.json`](diffhunk://#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34L18-R23): Added support for Laravel ^12.0 and Pest ^3.7 in the `require` and `require-dev` sections, respectively. * [`composer.json`](diffhunk://#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34L53-R55): Set the minimum stability to "dev" and preferred stability to true to ensure the use of stable versions when available. --------- Co-authored-by: Shift <[email protected]>
1 parent c527b90 commit afc690d

File tree

2 files changed

+41
-16
lines changed

2 files changed

+41
-16
lines changed

.github/workflows/run-tests.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,47 @@ on:
44
push:
55
pull_request:
66
schedule:
7-
- cron: "0 0 * * *"
7+
- cron: '0 0 * * *'
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
1213
strategy:
1314
fail-fast: false
1415
matrix:
15-
php: [8.3, 8.2, 8.1, 8.0]
16-
laravel: ["^11.0", "^10.0", "^9.0", "^8.0"]
17-
dependency-version: [prefer-lowest, prefer-stable]
16+
php:
17+
- 8.4
18+
- 8.3
19+
- 8.2
20+
- 8.1
21+
- 8.0
22+
laravel:
23+
- ^12.0
24+
- ^11.0
25+
- ^10.0
26+
- ^9.0
27+
- ^8.0
28+
dependency-version:
29+
- prefer-lowest
30+
- prefer-stable
1831
exclude:
19-
- laravel: "^11.0"
32+
- laravel: ^12.0
33+
php: 8.1
34+
- laravel: ^12.0
35+
php: 8.0
36+
- laravel: ^11.0
2037
php: 8.1
21-
- laravel: "^11.0"
38+
- laravel: ^11.0
2239
php: 8.0
23-
- laravel: "^10.0"
40+
- laravel: ^10.0
2441
php: 8.0
42+
include:
43+
- with_coverage: false
44+
- with_coverage: true
45+
php: 8.3
46+
laravel: ^11.0
47+
dependency-version: prefer-stable
2548

2649
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2750

@@ -41,17 +64,17 @@ jobs:
4164
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
4265
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
4366
67+
- name: Execute tests - without coverage
68+
if: matrix.with_coverage == false
69+
run: vendor/bin/pest
70+
4471
- name: Execute tests - with coverage
4572
id: test
46-
if: matrix.dependency-version == 'prefer-stable' && matrix.php == 8.3 && matrix.laravel == '^11.0'
73+
if: matrix.with_coverage == true
4774
run: vendor/bin/pest --coverage
4875

49-
- name: Execute tests - without coverage
50-
if: steps.test.outcome == 'skipped'
51-
run: vendor/bin/pest
52-
5376
- name: Upload coverage reports to Codecov
54-
if: steps.test.outcome == 'success'
77+
if: matrix.with_coverage == true
5578
uses: codecov/codecov-action@v5
5679
with:
5780
token: ${{ secrets.CODECOV_TOKEN }}

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
],
1616
"require": {
1717
"php": ">=8.0",
18-
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
18+
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
1919
"google/apiclient": "^2.16"
2020
},
2121
"require-dev": {
2222
"mockery/mockery": "^1.6",
23-
"pestphp/pest": "^1.20|^2.0"
23+
"pestphp/pest": "^1.20|^2.0|^3.7"
2424
},
2525
"autoload": {
2626
"psr-4": {
@@ -50,5 +50,7 @@
5050
"Google": "PulkitJalan\\Google\\Facades\\Google"
5151
}
5252
}
53-
}
53+
},
54+
"minimum-stability": "dev",
55+
"prefer-stable": true
5456
}

0 commit comments

Comments
 (0)