From f6ed2cba476ce9f1b39de99a649231d4bc8c7339 Mon Sep 17 00:00:00 2001 From: Sven Luijten Date: Sun, 7 Jan 2024 15:45:03 +0100 Subject: [PATCH 1/5] Add empty directory to fix tests --- tests/resources/testcases/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/resources/testcases/.gitkeep diff --git a/tests/resources/testcases/.gitkeep b/tests/resources/testcases/.gitkeep new file mode 100644 index 0000000..e69de29 From fa081afd29271a8f0338be2682016d95ec74d2a5 Mon Sep 17 00:00:00 2001 From: Sven Luijten Date: Sun, 7 Jan 2024 16:01:51 +0100 Subject: [PATCH 2/5] Use at least version 5.1.1 of snapshot assertions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ec3365f..1b0d7d0 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ } ], "require-dev": { - "spatie/phpunit-snapshot-assertions": "^5.1", + "spatie/phpunit-snapshot-assertions": "^5.1.1", "phpunit/phpunit": "^10.5", "spatie/pixelmatch-php": "^1.0" } From 747432318dfb8154ab832a47ceb6ed28bd8d8c74 Mon Sep 17 00:00:00 2001 From: Sven Luijten Date: Sun, 7 Jan 2024 16:02:40 +0100 Subject: [PATCH 3/5] Don't delete .gitkeep after integration tests --- tests/Integration/IntegrationTestCase.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Integration/IntegrationTestCase.php b/tests/Integration/IntegrationTestCase.php index 83395d7..464b301 100644 --- a/tests/Integration/IntegrationTestCase.php +++ b/tests/Integration/IntegrationTestCase.php @@ -20,7 +20,12 @@ protected function tearDown(): void RecursiveIteratorIterator::CHILD_FIRST, ); + /** @var \SplFileInfo $file */ foreach ($files as $file) { + if ($file->getFilename() === '.gitkeep') { + continue; + } + unlink($file->getRealPath()); } } From a510c1f4facc38d73910cacc010a7f68a5ae8540 Mon Sep 17 00:00:00 2001 From: Sven Luijten Date: Sun, 7 Jan 2024 16:16:04 +0100 Subject: [PATCH 4/5] Don't run tests on Windows / PHP 8.3 --- .github/workflows/run-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b396b33..e746b81 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,6 +14,10 @@ jobs: os: [ubuntu-latest, windows-latest] php: [8.2, 8.3] stability: [prefer-lowest, prefer-stable] + exclude: + # imagick cannot be installed for PHP 8.3 on Windows (yet) + - os: windows-latest + php: 8.3 name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} From a7a7a3240d3ec31aedb23946819ac49b9b3db08e Mon Sep 17 00:00:00 2001 From: Sven Luijten Date: Sun, 7 Jan 2024 16:23:33 +0100 Subject: [PATCH 5/5] Do not test on Windows --- .github/workflows/run-tests.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e746b81..ae668d7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -7,19 +7,14 @@ on: jobs: run-tests: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest] php: [8.2, 8.3] stability: [prefer-lowest, prefer-stable] - exclude: - # imagick cannot be installed for PHP 8.3 on Windows (yet) - - os: windows-latest - php: 8.3 - name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} steps: - name: Checkout code