refactor: separate actions in substructure, run as bash script

This commit is contained in:
2025-09-24 11:22:25 -05:00
parent 02847e3f12
commit dab8ea6d9b
8 changed files with 203 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
name: Install Python Environment
description: Set up a Python virtual environment and install required packages
inputs:
PLUGIN_REPO_NAME:
description: "Name of the plugin repository to install dependencies for"
required: true
default: ""
PYTHON_VERSION:
description: "Python version to use"
required: false
default: "3.11"
runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.PYTHON_VERSION }}
- name: Install Python Environment
shell: bash
run: |
chmod +x run_ci.sh
./run_ci.sh "${{ inputs.PLUGIN_REPO_NAME }}"

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
PLUGIN_REPO_NAME="$1"
echo "--- Installing Python Environment ---"
# --- Step 1: Install Python Packages ---
echo "=== Install Python Environment ==="
echo "Running on Python version $(python -V)"
python -m pip install --upgrade pip
pip install uv
uv pip install --system -e ./_bec_checkout_/bec/bec_lib/[dev]
uv pip install --system -e ./_bec_checkout_/bec/bec_ipython_client
uv pip install --system -e ./_bec_checkout_/bec/bec_server[dev]
uv pip install --system -e ./_bec_widgets_checkout_/bec_widgets[dev,pyside6]
uv pip install --system -e ./_ophyd_devices_checkout_/ophyd_devices[dev]
pip install -e "./_plugin_checkout_/${PLUGIN_REPO_NAME}[dev]"
echo "=== Completed Python Environment Installation ==="