diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2620463..383995d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,26 +1,36 @@ name: CI -on: [push, pull_request] + +on: + pull_request: + types: [opened, synchronize, reopened] + jobs: run: strategy: matrix: include: - - php: '7.4' - php: '8.0' - php: '8.1' - php: '8.2' + - php: '8.3' + - php: '8.4' + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up PHP uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" + - name: Install dependencies run: composer self-update && composer install && composer dump-autoload + - name: Run tests and collect coverage run: vendor/bin/phpunit --coverage-clover coverage.xml . + - name: Upload coverage to Codecov uses: codecov/codecov-action@v4-beta env: diff --git a/composer.json b/composer.json index bb7fe83..f1e5fe1 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "php": ">=7.4", "ext-json": "*", "ext-mbstring": "*", - "laminas/laminas-diactoros": "^2", + "laminas/laminas-diactoros": "^3", "miladrahimi/phpcontainer": "^5" }, "require-dev": { diff --git a/tests/Features/ViewTest.php b/tests/Features/ViewTest.php index e7f6179..a651b37 100644 --- a/tests/Features/ViewTest.php +++ b/tests/Features/ViewTest.php @@ -10,6 +10,7 @@ class ViewTest extends TestCase { /** + * @runInSeparateProcess * @throws Throwable */ public function test_with_the_sample_view() @@ -28,6 +29,7 @@ public function test_with_the_sample_view() } /** + * @runInSeparateProcess * @throws Throwable */ public function test_with_the_sample_view_and_status_201_and_headers() diff --git a/tests/Units/HttpPublisherTest.php b/tests/Units/HttpPublisherTest.php index eba105b..234060e 100644 --- a/tests/Units/HttpPublisherTest.php +++ b/tests/Units/HttpPublisherTest.php @@ -58,6 +58,7 @@ public function test_publish_a_array_response() } /** + * @runInSeparateProcess * @throws Throwable */ public function test_publish_a_standard_response()