From 9deba0982582a386f4a5e64705f8709c00d08535 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 20:24:55 +0300 Subject: [PATCH 1/7] Improve CI coverage Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 80898a39..606df732 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,21 +38,40 @@ jobs: - run: vendor/bin/phpstan analyze tests: - name: "Tests (PHP ${{ matrix.php }}, Selenium ${{ matrix.selenium_version }})${{ matrix.with_coverage == true && ' with coverage' || ''}}" + name: "Tests (PHP ${{ matrix.php }}, ${{ matrix.browser }}, Selenium ${{ matrix.selenium_version }})${{ matrix.with_coverage == true && ' with coverage' || ''}}" runs-on: ubuntu-latest strategy: matrix: + browser: [ 'firefox' ] selenium_version: [ '2.53.1' ] - php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php: [ '7.2', '7.4', '8.0', '8.1', '8.2', '8.3'] with_coverage: [ false ] include: - - selenium_version: '2.53.1' + # Cover code paths for PHP < 7.4 + - browser: 'firefox' + selenium_version: '2.53.1' + php: '7.3' + with_coverage: true + # Check each browser on each supported Selenium version + - browser: 'firefox' + selenium_version: '2.53.1' + php: '8.4' + with_coverage: true + - browser: 'firefox' + selenium_version: '3' + php: '8.4' + with_coverage: true + - browser: 'chrome' + selenium_version: '2.53.1' php: '8.4' with_coverage: true - - selenium_version: '3.141.59' + - browser: 'chrome' + selenium_version: '3' php: '8.4' with_coverage: true - - selenium_version: '4' + # Check that unsupported Selenium version is rejected + - browser: 'firefox' + selenium_version: '4' php: '8.4' with_coverage: true fail-fast: false @@ -86,7 +105,7 @@ jobs: - name: Start Selenium run: | - SELENIUM_IMAGE=selenium/standalone-firefox:${{ matrix.selenium_version }} docker compose up --wait + SELENIUM_IMAGE=selenium/standalone-${{ matrix.browser }}:${{ matrix.selenium_version }} docker compose up --wait - name: Wait for browser & PHP to start run: | @@ -99,7 +118,7 @@ jobs: SELENIUM_VERSION: ${{ matrix.selenium_version }} DRIVER_URL: http://localhost:4444/wd/hub WEB_FIXTURES_HOST: http://host.docker.internal:8002 - WEB_FIXTURES_BROWSER: firefox + WEB_FIXTURES_BROWSER: ${{ matrix.browser }} DRIVER_MACHINE_BASE_PATH: /fixtures/ run: | vendor/bin/phpunit -v --coverage-clover=coverage.xml --log-junit junit.xml @@ -110,7 +129,7 @@ jobs: SELENIUM_VERSION: ${{ matrix.selenium_version }} DRIVER_URL: http://localhost:4444/wd/hub WEB_FIXTURES_HOST: http://host.docker.internal:8002 - WEB_FIXTURES_BROWSER: firefox + WEB_FIXTURES_BROWSER: ${{ matrix.browser }} DRIVER_MACHINE_BASE_PATH: /fixtures/ run: | vendor/bin/phpunit -v @@ -137,6 +156,6 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v4 with: - name: logs_php-${{ matrix.php }}_selenium-${{ matrix.selenium_version }}_firefox + name: logs_php-${{ matrix.php }}_selenium-${{ matrix.selenium_version }}_${{ matrix.browser }} path: | logs From ac436d769298cfd5bce3cd377ed35df01b0fd6ac Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 20:26:57 +0300 Subject: [PATCH 2/7] Use PHP 8.5 in CI Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 606df732..91446c37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: coverage: none - php-version: '8.4' + php-version: '8.5' - run: composer validate --strict --no-check-lock static_analysis: @@ -32,7 +32,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: coverage: none - php-version: '8.4' + php-version: '8.5' - name: Install dependencies run: composer update --ansi --no-progress --prefer-dist --no-interaction - run: vendor/bin/phpstan analyze @@ -44,7 +44,7 @@ jobs: matrix: browser: [ 'firefox' ] selenium_version: [ '2.53.1' ] - php: [ '7.2', '7.4', '8.0', '8.1', '8.2', '8.3'] + php: [ '7.2', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] with_coverage: [ false ] include: # Cover code paths for PHP < 7.4 @@ -55,24 +55,24 @@ jobs: # Check each browser on each supported Selenium version - browser: 'firefox' selenium_version: '2.53.1' - php: '8.4' + php: '8.5' with_coverage: true - browser: 'firefox' selenium_version: '3' - php: '8.4' + php: '8.5' with_coverage: true - browser: 'chrome' selenium_version: '2.53.1' - php: '8.4' + php: '8.5' with_coverage: true - browser: 'chrome' selenium_version: '3' - php: '8.4' + php: '8.5' with_coverage: true # Check that unsupported Selenium version is rejected - browser: 'firefox' selenium_version: '4' - php: '8.4' + php: '8.5' with_coverage: true fail-fast: false From f9e39aa6db63f49f1f7013abae402a11d56fb4b1 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 20:30:01 +0300 Subject: [PATCH 3/7] Don't collect coverage on Chrome jobs Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91446c37..70325ef6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,11 +64,11 @@ jobs: - browser: 'chrome' selenium_version: '2.53.1' php: '8.5' - with_coverage: true + with_coverage: false - browser: 'chrome' selenium_version: '3' php: '8.5' - with_coverage: true + with_coverage: false # Check that unsupported Selenium version is rejected - browser: 'firefox' selenium_version: '4' From 81a7ed68f80b0bb7de513a3da8ce3b85c81a0318 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 20:36:02 +0300 Subject: [PATCH 4/7] Skip keyboard events test on Chrome with Selenium 2 Co-Authored-By: Claude Opus 5.5 --- tests/Selenium2Config.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Selenium2Config.php b/tests/Selenium2Config.php index b40cbb57..89dcc1f8 100644 --- a/tests/Selenium2Config.php +++ b/tests/Selenium2Config.php @@ -88,6 +88,14 @@ public function skipMessage($testCase, $test): ?string } } + if (array(EventsTest::class, 'testKeyboardEvents') === $testCallback) { + $browser = $_SERVER['WEB_FIXTURES_BROWSER'] ?? null; + + if ($browser === 'chrome' && $this->getSeleniumMajorVersion() === 2) { + return 'The Chrome browser compatible with Selenium 2.x ignores key codes in synthetic keyboard events.'; + } + } + // Skip right-clicking tests, when an unsupported Selenium version detected. if ((array(HoverTest::class, 'testRightClickHover') === $testCallback || array(EventsTest::class, 'testRightClick') === $testCallback) && !$this->isRightClickingInSeleniumSupported() From 6cd6b85146552a2a6314d699292c739056443ad4 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 20:58:38 +0300 Subject: [PATCH 5/7] Show browser version in CI Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 70325ef6..bb3a0076 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -112,6 +112,10 @@ jobs: curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:4444/wd/hub/status curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:8002/index.html + - name: Show browser version + run: | + docker compose exec selenium sh -c 'google-chrome --version || chromium --version || microsoft-edge --version || firefox --version' 2>/dev/null + - name: Run tests with Coverage if: "${{ matrix.with_coverage == true }}" env: From 2a0f3e859b661ed3b32ff7c5b0f4ff826e2af34e Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 21:11:27 +0300 Subject: [PATCH 6/7] Replace deprecated Codecov test results action Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bb3a0076..bed67014 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -140,16 +140,18 @@ jobs: - name: Upload coverage to Codecov if: ${{ matrix.with_coverage == true && !cancelled() }} - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage.xml - name: Upload test results to Codecov if: ${{ matrix.with_coverage == true && !cancelled() }} - uses: codecov/test-results-action@v1 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} + files: junit.xml + report_type: test_results - name: Extract docker logs if: ${{ failure() }} From 87458ffa5213e5c30c4b6535bc6d174c70a1739e Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 10 Oct 2026 21:16:50 +0300 Subject: [PATCH 7/7] Upload test results from all CI jobs Co-Authored-By: Claude Opus 5.5 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bed67014..a696b09c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -136,7 +136,7 @@ jobs: WEB_FIXTURES_BROWSER: ${{ matrix.browser }} DRIVER_MACHINE_BASE_PATH: /fixtures/ run: | - vendor/bin/phpunit -v + vendor/bin/phpunit -v --log-junit junit.xml - name: Upload coverage to Codecov if: ${{ matrix.with_coverage == true && !cancelled() }} @@ -146,7 +146,7 @@ jobs: files: coverage.xml - name: Upload test results to Codecov - if: ${{ matrix.with_coverage == true && !cancelled() }} + if: ${{ !cancelled() }} uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }}