1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-04-21 07:44:35 +02:00
Files
bec_widgets/.github/workflows/pytest-matrix.yml
2026-04-17 16:06:02 +02:00

59 lines
1.8 KiB
YAML

name: Run Pytest with different Python versions
on:
workflow_call:
inputs:
pr_number:
description: "Pull request number"
required: false
type: number
BEC_CORE_BRANCH:
description: "Branch of BEC Core to install"
required: false
default: "main"
type: string
OPHYD_DEVICES_BRANCH:
description: "Branch of Ophyd Devices to install"
required: false
default: "main"
type: string
BEC_WIDGETS_BRANCH:
description: "Branch of BEC Widgets to install"
required: false
default: "main"
type: string
jobs:
pytest-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
env:
BEC_WIDGETS_BRANCH: main # Set the branch you want for bec_widgets
BEC_CORE_BRANCH: main # Set the branch you want for bec
OPHYD_DEVICES_BRANCH: main # Set the branch you want for ophyd_devices
PROJECT_PATH: ${{ github.repository }}
QTWEBENGINE_DISABLE_SANDBOX: 1
QT_QPA_PLATFORM: "offscreen"
steps:
- name: Checkout BEC Widgets
uses: actions/checkout@v4
with:
repository: bec-project/bec_widgets
ref: ${{ inputs.BEC_WIDGETS_BRANCH }}
- name: Install BEC Widgets and dependencies
uses: ./.github/actions/bw_install
with:
BEC_WIDGETS_BRANCH: ${{ inputs.BEC_WIDGETS_BRANCH }}
BEC_CORE_BRANCH: ${{ inputs.BEC_CORE_BRANCH }}
OPHYD_DEVICES_BRANCH: ${{ inputs.OPHYD_DEVICES_BRANCH }}
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Run Pytest
run: |
pip install pytest pytest-random-order
pytest -v --junitxml=report.xml --random-order --ignore=tests/unit_tests/benchmarks ./tests/unit_tests