mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-04 05:15:10 +00:00
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
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 Miniconda
|
|
uses: conda-incubator/setup-miniconda@v3
|
|
with:
|
|
miniconda-version: 'latest'
|
|
channels: conda-forge,robostack-staging,uni-lab,defaults
|
|
channel-priority: strict
|
|
activate-environment: check-env
|
|
auto-activate-base: false
|
|
auto-update-conda: false
|
|
show-channel-urls: true
|
|
|
|
- name: Install minimal ROS dependencies
|
|
run: |
|
|
conda install -n check-env 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 -c robostack-staging -c conda-forge -y
|
|
|
|
- name: Install unilabos-msgs and project
|
|
run: |
|
|
conda install -n check-env ros-humble-unilabos-msgs -c uni-lab -c robostack-staging -c conda-forge -y
|
|
pip install -e .
|
|
|
|
- name: Run check mode (complete_registry)
|
|
run: |
|
|
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 "检查通过:无文件变化"
|