Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,37 @@ name: run-tests

on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: ['8.0', 8.1, 8.2]
laravel: [9.*, 10.*]
laravel: ['9.*', '10.*', '11.*']
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: ^7.22
- laravel: 10.*
testbench: ^8.0
- laravel: 11.*
testbench: ^9.0
exclude:
- laravel: 10.*
php: '8.0'
- laravel: 11.*
php: '8.0'
- laravel: 11.*
php: 8.1

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

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea
.php_cs
.php_cs.cache
.phpunit.result.cache
*.cache
build
composer.lock
coverage
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
}
],
"require": {
"php": "^8.0",
"spatie/laravel-package-tools": "^1.4.3",
"illuminate/contracts": "^9.0|^10.0"
"php": "^8.2",
"spatie/laravel-package-tools": "^1.16",
"illuminate/contracts": "^11.0"
},
"require-dev": {
"brianium/paratest": "^6.2",
"nunomaduro/collision": "^6.0|^7.0",
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.3|^10.0",
"brianium/paratest": "^7.4",
"nunomaduro/collision": "^8.0",
"orchestra/testbench": "^9.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ray": "^1.9",
"vimeo/psalm": "^4.4"
"vimeo/psalm": "^4.4|^5.22"
},
"autoload": {
"psr-4": {
Expand Down
58 changes: 21 additions & 37 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="RyanChandler Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="RyanChandler Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
3 changes: 2 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ protected function getPackageProviders($app)
public function getEnvironmentSetUp($app)
{
config()->set('database.default', 'testing');
config()->set('cache.default', 'file');

/*
include_once __DIR__.'/../database/migrations/create_blade-cache-directive_table.php.stub';
(new \CreatePackageTable())->up();
*/

$app['config']->set('view.paths', [__DIR__ . '/resources/views']);
}
}