fix(channels): complete dependency manifest migration (#4995)

* fix(channels): complete dependency manifest migration

* docs(docker): clarify custom uid dependency installs

* fix(channels): keep dependency preinstall internal

* refactor(channels): move dependency installer to scripts

* fix(docker): limit runtime write access
This commit is contained in:
chengyongru
2026-07-20 15:24:57 +08:00
committed by GitHub
parent 76f3eead42
commit 8423cf3eeb
10 changed files with 177 additions and 13 deletions
+27 -3
View File
@@ -57,21 +57,26 @@ jobs:
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Install channel dependencies
run: uv run --no-sync python -m scripts.install_channel_dependencies --all-channels
# Channel requirements live in manifests rather than uv.lock. Avoid a
# later uv run sync pruning the packages installed by the previous step.
- name: Lint with ruff
if: matrix.coverage
run: uv run ruff check nanobot tests conftest.py
run: uv run --no-sync ruff check nanobot tests conftest.py
- name: Run tests with coverage
if: matrix.coverage
run: >-
uv run python -m pytest
uv run --no-sync python -m pytest
--cov=nanobot --cov-report=term-missing:skip-covered
--durations=25 --durations-min=1.0
- name: Run compatibility tests
if: ${{ !matrix.coverage }}
run: >-
uv run python -m pytest
uv run --no-sync python -m pytest
--durations=25 --durations-min=1.0
webui:
@@ -105,3 +110,22 @@ jobs:
- name: Build WebUI
working-directory: webui
run: bun run build
docker:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Build image with default channel dependencies
run: docker build -t nanobot:test .
- name: Verify default WhatsApp dependencies
run: docker run --rm --entrypoint python nanobot:test -c "import neonize, segno"
- name: Verify runtime dependency permissions
run: >-
docker run --rm --user 1000:1000 --entrypoint sh nanobot:test -c
'test -w /app/.venv && test ! -w /app && test ! -w /app/nanobot &&
python -m scripts.install_channel_dependencies discord && python -c "import discord"'