name: CI Check on: push: branches: [main, dev] pull_request: branches: [main, dev] jobs: registry-check: runs-on: ubuntu-latest defaults: run: shell: bash -l {0} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Miniforge uses: conda-incubator/setup-miniconda@v3 with: miniforge-version: latest use-mamba: true channels: robostack-staging,conda-forge,uni-lab channel-priority: flexible activate-environment: check-env auto-activate-base: false auto-update-conda: false show-channel-urls: true - name: Install ROS dependencies and unilabos-msgs run: | # Install all packages together for proper dependency resolution # Use mamba for faster and more reliable solving mamba install -n check-env \ python=3.11.14 \ robostack-staging::ros-humble-ros-core \ robostack-staging::ros-humble-action-msgs \ robostack-staging::ros-humble-std-msgs \ robostack-staging::ros-humble-geometry-msgs \ robostack-staging::ros-humble-control-msgs \ robostack-staging::ros-humble-nav2-msgs \ uni-lab::ros-humble-unilabos-msgs \ robostack-staging::ros-humble-cv-bridge \ robostack-staging::ros-humble-vision-opencv \ robostack-staging::ros-humble-tf-transformations \ robostack-staging::ros-humble-moveit-msgs \ robostack-staging::ros-humble-tf2-ros \ robostack-staging::ros-humble-tf2-ros-py \ conda-forge::transforms3d \ -c robostack-staging -c conda-forge -c uni-lab -y - name: Install pip dependencies and unilabos run: | # Activate the environment conda activate check-env # Core dependencies for devices pip install uv uv pip install networkx \ typing_extensions \ websockets \ msgcenterpy \ opentrons_shared_data \ pint \ fastapi \ jinja2 \ requests \ uvicorn \ git+https://github.com/Xuwznln/pylabrobot.git \ opencv-python \ pyautogui \ opcua \ pyserial \ pandas \ crcmod-plus \ pymodbus \ pywinauto_recorder \ matplotlib \ # PyLabRobot (custom fork) pip install # Install unilabos in editable mode pip install -e . - name: Run check mode (complete_registry) run: | conda activate check-env python -m unilabos --check_mode --skip_env_check - name: Check for uncommitted changes run: | if ! git diff --exit-code; then echo "::error::检测到文件变化!请先在本地运行 'python -m unilabos --complete_registry' 并提交变更" echo "变化的文件:" git diff --name-only exit 1 fi echo "检查通过:无文件变化"