Release 4.22 Updates #957
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: Run Python examples | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '50 22 * * *' | |
pull_request: | |
branches: | |
- trunk | |
paths: | |
- 'examples/python/**' | |
push: | |
branches: | |
- trunk | |
paths: | |
- 'examples/python/**' | |
env: | |
DISPLAY: :99 | |
GITHUB_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} | |
GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu, windows, macos ] | |
release: [ stable, nightly ] | |
runs-on: ${{ format('{0}-latest', inputs.os) }} | |
steps: | |
- name: Checkout GitHub repo | |
uses: actions/checkout@v4 | |
- name: Remove driver directories Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
rm "$env:ChromeWebDriver" -r -v | |
rm "$env:EdgeWebDriver" -r -v | |
rm "$env:GeckoWebDriver" -r -v | |
- name: Remove driver directories Non-Windows | |
if: matrix.os != 'windows-latest' | |
run: | | |
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER | |
- name: Setup Chrome | |
uses: browser-actions/setup-chrome@latest | |
with: | |
chrome-version: stable' | |
- name: Setup Firefox | |
uses: abhi1693/setup-browser@v0.3.5 | |
with: | |
browser: firefox | |
version: latest | |
- name: Setup Edge | |
uses: browser-actions/setup-edge@latest | |
with: | |
edge-version: stable | |
- name: Start Xvfb | |
if: matrix.os == 'ubuntu-latest' | |
run: Xvfb :99 & | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies nightly | |
if: matrix.release == 'nightly' | |
working-directory: ./examples/python | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --force-reinstall -v selenium | |
- name: Install dependencies stable | |
if: matrix.release == 'stable' | |
working-directory: ./examples/python | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Run tests | |
uses: nick-invision/retry@v3.0.0 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
command: | | |
cd examples/python | |
pytest |