wip
This commit is contained in:
@ -16,6 +16,10 @@ on:
|
|||||||
description: "Branch of Ophyd Devices to install"
|
description: "Branch of Ophyd Devices to install"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
BEC_PLUGIN_REPO_BRANCH:
|
||||||
|
description: "Branch of the BEC Plugin Repository to install"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
@ -31,18 +35,71 @@ jobs:
|
|||||||
QT_QPA_PLATFORM: "offscreen"
|
QT_QPA_PLATFORM: "offscreen"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Shared Actions Repo
|
- name: Checkout BEC Plugin Repository
|
||||||
|
id: plugin_checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: bec/bec_shared_actions
|
repository: bec/phoenix_bec
|
||||||
ref: main
|
ref: ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}
|
||||||
|
|
||||||
- name: Install and test a BEC plugin repository
|
- name: Setup Python
|
||||||
uses: https://gitea.psi.ch/bec/bec_shared_actions/.gitea/plugin_repo_tests@main
|
uses: actions/setup-python@v4
|
||||||
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
with:
|
with:
|
||||||
BEC_CORE_BRANCH: ${{ inputs.BEC_CORE_BRANCH || 'main' }}
|
python-version: ${{ inputs.PYTHON_VERSION }}
|
||||||
BEC_WIDGETS_BRANCH: ${{ inputs.BEC_WIDGETS_BRANCH || 'main' }}
|
|
||||||
OPHYD_DEVICES_BRANCH: ${{ inputs.OPHYD_DEVICES_BRANCH || 'main' }}
|
- name: Checkout BEC Core
|
||||||
BEC_PLUGIN_REPO_URL: "https://gitea.psi.ch/bec/phoenix_bec.git"
|
uses: actions/checkout@v4
|
||||||
BEC_PLUGIN_REPO_BRANCH: ${{ gitea.ref_name || 'main' }}
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
PYTHON_VERSION: "3.11"
|
with:
|
||||||
|
repository: bec/bec
|
||||||
|
ref: ${{ inputs.BEC_CORE_BRANCH }}
|
||||||
|
path: ./_checkout_/bec
|
||||||
|
|
||||||
|
- name: Checkout Ophyd Devices
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
|
with:
|
||||||
|
repository: bec/ophyd_devices
|
||||||
|
ref: ${{ inputs.OPHYD_DEVICES_BRANCH }}
|
||||||
|
path: ./_checkout_/ophyd_devices
|
||||||
|
|
||||||
|
- name: Checkout BEC Widgets
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
|
with:
|
||||||
|
repository: bec/bec_widgets
|
||||||
|
ref: ${{ inputs.BEC_WIDGETS_BRANCH }}
|
||||||
|
path: ./_checkout_/bec_widgets
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
|
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
|
||||||
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
|
run: |
|
||||||
|
pip install uv
|
||||||
|
# print the current directory to verify the structure
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
echo "Available directories: $(ls _checkout_)"
|
||||||
|
uv pip install --system -e ./_checkout_/ophyd_devices[dev]
|
||||||
|
uv pip install --system -e ./_checkout_/bec/bec_lib[dev]
|
||||||
|
uv pip install --system -e ./_checkout_/bec/bec_ipython_client[dev]
|
||||||
|
uv pip install --system -e ./_checkout_/bec/bec_server[dev]
|
||||||
|
uv pip install --system -e ./_checkout_/bec_widgets[dev]
|
||||||
|
uv pip install --system -e ./phoenix_bec[dev]
|
||||||
|
|
||||||
|
- name: Run Pytest
|
||||||
|
shell: bash
|
||||||
|
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||||
|
run: |
|
||||||
|
cd ./phoenix_bec
|
||||||
|
# echo "::group::Running Pytest"
|
||||||
|
pytest -v --maxfail=2 --random-order ./tests
|
||||||
|
# echo "::endgroup::"
|
||||||
|
Reference in New Issue
Block a user