ci: add github actions

This commit is contained in:
2025-05-24 12:23:59 +02:00
parent a44b07c5da
commit a458d6942d
14 changed files with 913 additions and 0 deletions

42
.github/workflows/pytest-matrix.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Run Pytest with different Python versions
on:
workflow_call:
inputs:
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
jobs:
pytest-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout BEC Ophyd Devices
uses: actions/checkout@v4
with:
repository: bec-project/ophyd_devices
ref: ${{ inputs.OPHYD_DEVICES_BRANCH }}
- name: Install Ophyd Devices and dependencies
uses: ./.github/actions/ophyd_devices_install
with:
BEC_CORE_BRANCH: ${{ inputs.BEC_CORE_BRANCH }}
OPHYD_DEVICES_BRANCH: ${{ inputs.OPHYD_DEVICES_BRANCH }}
PYTHON_VERSION: ${{ matrix.python-version }}
- name: Run Pytest
run: |
cd ./ophyd_devices
pip install pytest pytest-random-order
pytest -v --maxfail=2 --junitxml=report.xml --random-order ./tests