mirror of
https://github.com/SeleniumHQ/selenium.git
synced 2026-03-26 16:18:38 +00:00
* [py] Add mode support to ruff runner and separate format/lint tasks * split up //py:ruff into //py:ruff-check and //py:ruff-format * [py] Add known-first-party config for isort to preserve import grouping
98 lines
2.2 KiB
YAML
98 lines
2.2 KiB
YAML
name: CI - Python
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
uses: ./.github/workflows/bazel.yml
|
|
with:
|
|
name: Build
|
|
run: |
|
|
bazel build //py:selenium-wheel //py:selenium-sdist
|
|
|
|
docs:
|
|
name: Documentation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source tree
|
|
uses: actions/checkout@v4
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install tox
|
|
- name: Generate docs
|
|
run: |
|
|
tox -c py/tox.ini
|
|
env:
|
|
TOXENV: docs
|
|
|
|
typing:
|
|
name: Type Checker
|
|
uses: ./.github/workflows/bazel.yml
|
|
with:
|
|
name: Type Checker
|
|
run: bazel run //py:mypy
|
|
|
|
lint:
|
|
name: Lint
|
|
uses: ./.github/workflows/bazel.yml
|
|
with:
|
|
name: Lint
|
|
run: bazel run //py:ruff-check
|
|
|
|
unit-tests:
|
|
name: Unit Tests
|
|
needs: build
|
|
uses: ./.github/workflows/bazel.yml
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ['3.10', '3.14']
|
|
os: [ubuntu, macos, windows]
|
|
with:
|
|
name: Unit Tests (${{ matrix.python-version }}, ${{ matrix.os }})
|
|
os: ${{ matrix.os }}
|
|
python-version: ${{ matrix.python-version }}
|
|
run: bazel test --local_test_jobs 1 //py:unit
|
|
|
|
remote-tests:
|
|
name: Remote Tests
|
|
needs: build
|
|
uses: ./.github/workflows/bazel.yml
|
|
with:
|
|
name: Integration Tests Remote
|
|
browser: yes
|
|
rerun-with-debug: true
|
|
run: |
|
|
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote
|
|
|
|
browser-tests:
|
|
name: Browser Tests
|
|
needs: build
|
|
uses: ./.github/workflows/bazel.yml
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
browser: [chrome, firefox, chrome-bidi, edge]
|
|
os: [windows]
|
|
include:
|
|
- browser: safari
|
|
os: macos
|
|
with:
|
|
name: Integration Tests (${{ matrix.browser }})
|
|
browser: ${{ matrix.browser }}
|
|
os: ${{ matrix.os }}
|
|
rerun-with-debug: true
|
|
run: |
|
|
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-${{ matrix.browser }}
|