Skip to content

Commit

Permalink
Merge pull request #1 from Morning-Train/feature/laravel-10
Browse files Browse the repository at this point in the history
Add Laravel 10 support and new Pest stubs
  • Loading branch information
SimonJnsson authored Feb 16, 2023
2 parents 400b9a1 + 235a384 commit b1e552d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,27 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1, 8.0]
laravel: [9.*, 8.*]
php: [8.2, 8.1, 8.0]
laravel: [10.*, 9.*, 8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: ^6.23
exclude:
- laravel: 10.*
php: 8.0
- laravel: 8.*
php: 8.2

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

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
],
"require": {
"php": "^8.0",
"laravel/framework": "^8.71|^9.0"
"laravel/framework": "^8.71|^9.0|^10.0"
},
"require-dev": {
"phpunit/phpunit": "^9.4",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^6.24|^7.0"
"orchestra/testbench": "^6.24|^7.0|^8.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 0 additions & 3 deletions stubs/factory.stub
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use {{ namespacedModel }};

/**
* @extends Factory<{{ model }}>
*/
class {{ model }}Factory extends Factory
{
protected $model = {{ model }}::class;
Expand Down
7 changes: 7 additions & 0 deletions stubs/pest.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

it('performs a feature test', function () {
$response = $this->get('/');

$response->assertStatus(200);
});
5 changes: 5 additions & 0 deletions stubs/pest.unit.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

it('performs a unit test', function () {
expect(true)->toBeTrue();
});

0 comments on commit b1e552d

Please sign in to comment.