wip
This commit is contained in:
@ -16,6 +16,10 @@ on:
|
||||
description: "Branch of Ophyd Devices to install"
|
||||
required: false
|
||||
type: string
|
||||
BEC_PLUGIN_REPO_BRANCH:
|
||||
description: "Branch of the BEC Plugin Repository to install"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
@ -31,18 +35,71 @@ jobs:
|
||||
QT_QPA_PLATFORM: "offscreen"
|
||||
|
||||
steps:
|
||||
- name: Checkout Shared Actions Repo
|
||||
- name: Checkout BEC Plugin Repository
|
||||
id: plugin_checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: bec/bec_shared_actions
|
||||
ref: main
|
||||
repository: bec/phoenix_bec
|
||||
ref: ${{ inputs.BEC_PLUGIN_REPO_BRANCH }}
|
||||
|
||||
- name: Install and test a BEC plugin repository
|
||||
uses: https://gitea.psi.ch/bec/bec_shared_actions/.gitea/plugin_repo_tests@main
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||
with:
|
||||
BEC_CORE_BRANCH: ${{ inputs.BEC_CORE_BRANCH || 'main' }}
|
||||
BEC_WIDGETS_BRANCH: ${{ inputs.BEC_WIDGETS_BRANCH || 'main' }}
|
||||
OPHYD_DEVICES_BRANCH: ${{ inputs.OPHYD_DEVICES_BRANCH || 'main' }}
|
||||
BEC_PLUGIN_REPO_URL: "https://gitea.psi.ch/bec/phoenix_bec.git"
|
||||
BEC_PLUGIN_REPO_BRANCH: ${{ gitea.ref_name || 'main' }}
|
||||
PYTHON_VERSION: "3.11"
|
||||
python-version: ${{ inputs.PYTHON_VERSION }}
|
||||
|
||||
- name: Checkout BEC Core
|
||||
uses: actions/checkout@v4
|
||||
# if: ( steps.plugin_checkout.outputs.skip_tests != 'true' )
|
||||
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