From dfa7d8a26f6d9b9be2d0e529a9f3b0879b96d573 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Mon, 18 Nov 2024 16:18:59 +0700 Subject: [PATCH] [ci] Add range of python version 3.8 to 3.13 for example tests Signed-off-by: Viet Nguyen Duc --- .github/workflows/python-examples.yml | 27 ++++++++++++++++++++++----- examples/python/requirements.txt | 1 + 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index e7d432cab113..6238c88ef60d 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -25,8 +25,25 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu, windows, macos ] - release: [ stable, nightly ] + include: + - os: ubuntu + release: stable + python: '3.8' + - os: ubuntu + release: nightly + python: '3.11' + - os: windows + release: stable + python: '3.9' + - os: windows + release: nightly + python: '3.12' + - os: macos + release: stable + python: '3.10' + - os: macos + release: nightly + python: '3.13' runs-on: ${{ format('{0}-latest', matrix.os) }} steps: - name: Checkout GitHub repo @@ -47,7 +64,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python }} - name: Install dependencies nightly non-Windows if: matrix.release == 'nightly' && matrix.os != 'windows' run: | @@ -80,8 +97,8 @@ jobs: - name: Run tests uses: nick-invision/retry@v3.0.0 with: - timeout_minutes: 40 + timeout_minutes: 60 max_attempts: 3 command: | cd examples/python - pytest + pytest --reruns 3 diff --git a/examples/python/requirements.txt b/examples/python/requirements.txt index aba556812b9c..1aeaa1a03aa1 100644 --- a/examples/python/requirements.txt +++ b/examples/python/requirements.txt @@ -2,5 +2,6 @@ selenium==4.26.1 pytest trio pytest-trio +pytest-rerunfailures flake8 requests