diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d11922b..87f62ff 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,17 +9,23 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: ['8.4', '8.3', '8.2', '8.1'] - laravel: [11.*, 10.*] + php: [8.1, 8.2, 8.3, 8.4] + laravel: [10.*, 11.*, 12.*] dependency-version: [prefer-lowest, prefer-stable] exclude: - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 + - laravel: 12.* + php: 8.2 include: - - laravel: 11.* - testbench: ^9.0 - laravel: 10.* testbench: ^8.0 + - laravel: 11.* + testbench: ^9.0 + - laravel: 12.* + testbench: ^10.0 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index f8221ff..3167309 100644 --- a/composer.json +++ b/composer.json @@ -25,8 +25,8 @@ }, "require-dev": { "mockery/mockery": "^1.5", - "orchestra/testbench": "^8.0|^9.0", - "phpunit/phpunit": "^10.5" + "orchestra/testbench": "^8.0|^9.0|^10.0", + "phpunit/phpunit": "^10.5|^11.5.3" }, "autoload": { "psr-4": { diff --git a/tests/Unit/Charts/BarChartTest.php b/tests/Unit/Charts/BarChartTest.php index 4ee2512..d89c8bf 100644 --- a/tests/Unit/Charts/BarChartTest.php +++ b/tests/Unit/Charts/BarChartTest.php @@ -7,6 +7,7 @@ use Fidum\VaporMetricsTile\Stores\VaporEnvironmentMetricsStore; use Fidum\VaporMetricsTile\Tests\TestCase; use Illuminate\Support\Collection; +use PHPUnit\Framework\Attributes\DataProvider; class BarChartTest extends TestCase { @@ -60,7 +61,7 @@ public function testChartWithSettings() ); } - /** @dataProvider unitProvider */ + #[DataProvider('unitProvider')] public function testUnit(string $period, string $expectedUnit) { config()->set('dashboard.tiles.vapor_metrics.period', $period); @@ -71,7 +72,7 @@ public function testUnit(string $period, string $expectedUnit) $this->assertSame($this->expectedOptions($expectedUnit), $chart->options); } - public function unitProvider(): array + public static function unitProvider(): array { //1m, 5m, 30m, 1h, 8h, 1d (default), 3d, 7d, 1M return [