Skip to content

Run Python examples #461

Run Python examples

Run Python examples #461

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:
test_examples:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
- name: Start Xvfb
if: matrix.os == 'ubuntu-latest'
run: Xvfb :99 &
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
working-directory: ./examples/python
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
uses: nick-invision/[email protected]
with:
timeout_minutes: 20
max_attempts: 3
command: |
cd examples/python
pytest