build: test ci shared action for pipeline
All checks were successful
CI for debye_bec / test (push) Successful in 24s
CI for debye_bec / test (pull_request) Successful in 23s

This commit is contained in:
2025-09-23 18:14:55 -05:00
parent 6a8f6c7988
commit d46ce4eaec

View File

@@ -39,59 +39,86 @@ jobs:
env:
QTWEBENGINE_DISABLE_SANDBOX: 1
QT_QPA_PLATFORM: "offscreen"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ inputs.PYTHON_VERSION || '3.11' }}"
- name: Checkout BEC Core
- name: Checkout this shared action repository
uses: actions/checkout@v4
with:
repository: bec/bec
ref: "${{ inputs.BEC_CORE_BRANCH || 'main' }}"
path: ./bec
repository: bec/bec_shared_actions
ref: main
path: bec_shared_actions
- name: Checkout Ophyd Devices
uses: actions/checkout@v4
- name: Run shared CI action
uses: ./bec_shared_actions
continue-on-error: true
with:
repository: bec/ophyd_devices
ref: "${{ inputs.OPHYD_DEVICES_BRANCH || 'main' }}"
path: ./ophyd_devices
BEC_WIDGETS_BRANCH: "${{ inputs.BEC_WIDGETS_BRANCH }}"
BEC_CORE_BRANCH: "${{ inputs.BEC_CORE_BRANCH }}"
OPHYD_DEVICES_BRANCH: "${{ inputs.OPHYD_DEVICES_BRANCH }}"
BEC_PLUGIN_REPO_BRANCH: "${{ inputs.BEC_PLUGIN_REPO_BRANCH }}"
BEC_PLUGIN_REPO_URL: "https://gitea.psi.ch/bec/debye_bec.git"
PYTHON_VERSION: "${{ inputs.PYTHON_VERSION }}"
APT_PACKAGES: "libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1"
# with:
# ref: "${{ github.head_ref || github.sha }}"
# - name: Checkout test-ci repo
# uses: actions/checkout@v4
# with:
# repository: tligui_y/test-ci
# ref: main
# path: test-ci
- name: Checkout BEC Widgets
uses: actions/checkout@v4
with:
repository: bec/bec_widgets
ref: "${{ inputs.BEC_WIDGETS_BRANCH || 'main' }}"
path: ./bec_widgets
# steps:
# - name: Setup Python
# uses: actions/setup-python@v5
# with:
# python-version: "${{ inputs.PYTHON_VERSION || '3.11' }}"
- name: Checkout BEC Plugin Repository
uses: actions/checkout@v4
with:
repository: bec/debye_bec
ref: "${{ inputs.BEC_PLUGIN_REPO_BRANCH || github.head_ref || github.sha }}"
path: ./debye_bec
# - name: Checkout BEC Core
# uses: actions/checkout@v4
# with:
# repository: bec/bec
# ref: "${{ inputs.BEC_CORE_BRANCH || 'main' }}"
# path: ./bec
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb
sudo apt-get -y install libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1
# - name: Checkout Ophyd Devices
# uses: actions/checkout@v4
# with:
# repository: bec/ophyd_devices
# ref: "${{ inputs.OPHYD_DEVICES_BRANCH || 'main' }}"
# path: ./ophyd_devices
- name: Install Python dependencies
shell: bash
run: |
pip install uv
uv pip install --system -e ./ophyd_devices
uv pip install --system -e ./bec/bec_lib[dev]
uv pip install --system -e ./bec/bec_ipython_client
uv pip install --system -e ./bec/bec_server[dev]
uv pip install --system -e ./bec_widgets[dev,pyside6]
uv pip install --system -e ./debye_bec
# - name: Checkout BEC Widgets
# uses: actions/checkout@v4
# with:
# repository: bec/bec_widgets
# ref: "${{ inputs.BEC_WIDGETS_BRANCH || 'main' }}"
# path: ./bec_widgets
- name: Run Pytest with Coverage
id: coverage
run: pytest --random-order --cov=./debye_bec --cov-config=./debye_bec/pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./debye_bec/tests/ || test $? -eq 5
# - name: Checkout BEC Plugin Repository
# uses: actions/checkout@v4
# with:
# repository: bec/debye_bec
# ref: "${{ inputs.BEC_PLUGIN_REPO_BRANCH || github.head_ref || github.sha }}"
# path: ./debye_bec
# - name: Install dependencies
# shell: bash
# run: |
# sudo apt-get update
# sudo apt-get install -y libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb
# sudo apt-get -y install libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1
# - name: Install Python dependencies
# shell: bash
# run: |
# pip install uv
# uv pip install --system -e ./ophyd_devices
# uv pip install --system -e ./bec/bec_lib[dev]
# uv pip install --system -e ./bec/bec_ipython_client
# uv pip install --system -e ./bec/bec_server[dev]
# uv pip install --system -e ./bec_widgets[dev,pyside6]
# uv pip install --system -e ./debye_bec
# - name: Run Pytest with Coverage
# id: coverage
# run: pytest --random-order --cov=./debye_bec --cov-config=./debye_bec/pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./debye_bec/tests/ || test $? -eq 5