From 5c53f9a59d404523e9844d628ed517570b56fa72 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Tue, 7 Oct 2025 14:37:23 -0400 Subject: [PATCH 1/6] [py] Re-add Windows to CI workflows --- .github/workflows/ci-python.yml | 62 +++++++++++++++++-- .../webdriver/remote/new_session_tests.py | 1 - .../webdriver/remote/subtyping_tests.py | 1 - 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 8cbff243e0962..8ce78e2d15db7 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -11,7 +11,8 @@ jobs: with: name: Build cache-key: py-build - run: bazel build //py:selenium-wheel //py:selenium-sdist + run: | + bazel build //py:selenium-wheel //py:selenium-sdist docs: name: Documentation @@ -29,7 +30,8 @@ jobs: python -m pip install --upgrade pip pip install tox==4.30.2 - name: Generate docs - run: tox -c py/tox.ini + run: | + tox -c py/tox.ini env: TOXENV: docs @@ -68,7 +70,25 @@ jobs: name: Unit Tests (${{ matrix.os }}) os: ${{ matrix.os }} cache-key: python-unit-test-${{ matrix.os }} - run: bazel test //py:unit + run: | + bazel test //py:unit + + unit-tests-windows: + name: Unit Tests + needs: build + uses: ./.github/workflows/bazel.yml + strategy: + fail-fast: false + matrix: + include: + - os: windows + with: + name: Unit Tests (${{ matrix.os }}) + os: ${{ matrix.os }} + cache-key: python-unit-test-${{ matrix.os }} + run: | + fsutil 8dot3name set 0 + bazel test //py:unit remote-tests: name: Remote Tests @@ -83,7 +103,8 @@ jobs: name: Integration Tests (remote, ${{ matrix.browser }}) browser: ${{ matrix.browser }} cache-key: py-remote-${{ matrix.browser }} - run: bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote + run: | + bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote browser-tests: name: Browser Tests @@ -105,7 +126,34 @@ jobs: os: ${{ matrix.os }} cache-key: py-browser-${{ matrix.browser }} run: | - bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }} + bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true \ + //py:common-${{ matrix.browser }}-bidi \ + //py:test-${{ matrix.browser }} + + browser-tests-windows: + name: Browser Tests + needs: build + uses: ./.github/workflows/bazel.yml + strategy: + fail-fast: false + matrix: + include: + - browser: chrome + os: windows + - browser: edge + os: windows + - browser: firefox + os: windows + with: + name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }}) + browser: ${{ matrix.browser }} + os: ${{ matrix.os }} + cache-key: py-browser-${{ matrix.browser }} + run: | + fsutil 8dot3name set 0 + bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true \ + //py:common-${{ matrix.browser }}-bidi \ + //py:test-${{ matrix.browser }} safari-tests: name: Browser Tests @@ -123,4 +171,6 @@ jobs: os: ${{ matrix.os }} cache-key: py-browser-${{ matrix.browser }} run: | - bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }} //py:test-${{ matrix.browser }} + bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true \ + //py:common-${{ matrix.browser }} \ + //py:test-${{ matrix.browser }} diff --git a/py/test/unit/selenium/webdriver/remote/new_session_tests.py b/py/test/unit/selenium/webdriver/remote/new_session_tests.py index a664fe2176fa7..e593bd9dda929 100644 --- a/py/test/unit/selenium/webdriver/remote/new_session_tests.py +++ b/py/test/unit/selenium/webdriver/remote/new_session_tests.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. - from importlib import import_module import pytest diff --git a/py/test/unit/selenium/webdriver/remote/subtyping_tests.py b/py/test/unit/selenium/webdriver/remote/subtyping_tests.py index 2380b69e0222a..3398cebe54c42 100644 --- a/py/test/unit/selenium/webdriver/remote/subtyping_tests.py +++ b/py/test/unit/selenium/webdriver/remote/subtyping_tests.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. - from selenium.webdriver.remote.webdriver import WebDriver, WebElement From f13573871c37ef3c9e321d0182b6ad0ebbaaa579 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Tue, 7 Oct 2025 15:52:01 -0400 Subject: [PATCH 2/6] [py] Fix workflow syntax --- .github/workflows/ci-python.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 8ce78e2d15db7..12ec1895cf6a9 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -126,9 +126,7 @@ jobs: os: ${{ matrix.os }} cache-key: py-browser-${{ matrix.browser }} run: | - bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true \ - //py:common-${{ matrix.browser }}-bidi \ - //py:test-${{ matrix.browser }} + bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }} browser-tests-windows: name: Browser Tests @@ -151,9 +149,7 @@ jobs: cache-key: py-browser-${{ matrix.browser }} run: | fsutil 8dot3name set 0 - bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true \ - //py:common-${{ matrix.browser }}-bidi \ - //py:test-${{ matrix.browser }} + bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }} safari-tests: name: Browser Tests @@ -171,6 +167,4 @@ jobs: os: ${{ matrix.os }} cache-key: py-browser-${{ matrix.browser }} run: | - bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true \ - //py:common-${{ matrix.browser }} \ - //py:test-${{ matrix.browser }} + bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }} //py:test-${{ matrix.browser }} From 8c0bc60c586fa976cef9d94e681339565d5563fb Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:41:22 -0400 Subject: [PATCH 3/6] [py] Remove Firefox on Windows because it's insanely slow --- .github/workflows/ci-python.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 12ec1895cf6a9..fab482cd78533 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -140,8 +140,6 @@ jobs: os: windows - browser: edge os: windows - - browser: firefox - os: windows with: name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} From d285ee2d363d463aa343a9ca3b3331e33946b97c Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:11:45 -0400 Subject: [PATCH 4/6] [py] Removing unit tests on Windows due to random timeouts on the GHA runners --- .github/workflows/ci-python.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index fab482cd78533..f3345dc457970 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -73,23 +73,6 @@ jobs: run: | bazel test //py:unit - unit-tests-windows: - name: Unit Tests - needs: build - uses: ./.github/workflows/bazel.yml - strategy: - fail-fast: false - matrix: - include: - - os: windows - with: - name: Unit Tests (${{ matrix.os }}) - os: ${{ matrix.os }} - cache-key: python-unit-test-${{ matrix.os }} - run: | - fsutil 8dot3name set 0 - bazel test //py:unit - remote-tests: name: Remote Tests needs: build From 72626e475634e12a9a3784280e303746817755ba Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:20:47 -0400 Subject: [PATCH 5/6] [py] Rename cache-key --- .github/workflows/ci-python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index f3345dc457970..69313a4d23431 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -127,12 +127,12 @@ jobs: name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} os: ${{ matrix.os }} - cache-key: py-browser-${{ matrix.browser }} + cache-key: py-browser-windows-${{ matrix.browser }} run: | fsutil 8dot3name set 0 bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }} - safari-tests: + browser-tests-macos: name: Browser Tests needs: build uses: ./.github/workflows/bazel.yml @@ -146,6 +146,6 @@ jobs: name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} os: ${{ matrix.os }} - cache-key: py-browser-${{ matrix.browser }} + cache-key: py-browser-macos-${{ matrix.browser }} run: | bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }} //py:test-${{ matrix.browser }} From 8dc8e7ae20e097259f19df7026c026a503065bde Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:35:18 -0400 Subject: [PATCH 6/6] Remove OS from cache keys --- .github/workflows/ci-python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 69313a4d23431..744ebbb8372fa 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -127,7 +127,7 @@ jobs: name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} os: ${{ matrix.os }} - cache-key: py-browser-windows-${{ matrix.browser }} + cache-key: py-browser-${{ matrix.browser }} run: | fsutil 8dot3name set 0 bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }}-bidi //py:test-${{ matrix.browser }} @@ -146,6 +146,6 @@ jobs: name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }}) browser: ${{ matrix.browser }} os: ${{ matrix.os }} - cache-key: py-browser-macos-${{ matrix.browser }} + cache-key: py-browser-${{ matrix.browser }} run: | bazel test --local_test_jobs 1 --flaky_test_attempts 3 --pin_browsers=true //py:common-${{ matrix.browser }} //py:test-${{ matrix.browser }}