CI - Python #3842
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - Python | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
uses: ./.github/workflows/bazel.yml | |
with: | |
name: Build | |
cache-key: py-build | |
run: bazel build //py:selenium-wheel //py:selenium-sdist | |
docs: | |
name: Documentation | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source tree | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox==4.6.4 | |
- name: Test with tox | |
run: tox -c py/tox.ini | |
env: | |
TOXENV: docs | |
lint: | |
name: Lint | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source tree | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox==4.6.4 | |
- name: Test with tox | |
run: tox -c py/tox.ini | |
env: | |
# If this fails, it will exit. Local work should be using `tox -e linting` prior to committing. | |
# the linting-ci recipe exists solely for CI and will not attempt to rewrite any files in-place etc. | |
TOXENV: linting-ci | |
mypy: | |
name: Mypy | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout source tree | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox==4.6.4 | |
- name: Test with tox | |
run: | | |
tox -c py/tox.ini -- --cobertura-xml-report ci || true | |
bash <(curl -s https://codecov.io/bash) -f py/ci/cobertura.xml | |
env: | |
TOXENV: mypy | |
unit-tests: | |
name: Unit Tests | |
needs: build | |
uses: ./.github/workflows/bazel.yml | |
with: | |
name: Unit Tests | |
cache-key: py-unit | |
run: bazel test //py:unit | |
browser-tests: | |
name: Browser Tests | |
needs: unit-tests | |
uses: ./.github/workflows/bazel.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: | |
- chrome | |
- firefox | |
with: | |
name: Integration Tests (${{ matrix.browser }}) | |
browser: ${{ matrix.browser }} | |
cache-key: py-${{ matrix.browser }} | |
run: bazel test --flaky_test_attempts 3 //py:test-${{ matrix.browser }} | |
remote-tests: | |
name: Remote Tests | |
needs: unit-tests | |
uses: ./.github/workflows/bazel.yml | |
with: | |
name: Integration Tests (remote) | |
browser: firefox | |
cache-key: py-remote | |
run: bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote |