mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-12 04:37:44 +02:00
[arnav] fix(ci): install local debug package via requirements-dev
This commit is contained in:
@@ -34,6 +34,8 @@ jobs:
|
||||
backend/requirements-dev.txt
|
||||
|
||||
- name: Install backend deps
|
||||
# Default cwd in GH Actions is the repo root, which is required for
|
||||
# the `-e ./debugger` line in backend/requirements-dev.txt to resolve.
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install \
|
||||
|
||||
@@ -9,3 +9,5 @@
|
||||
|
||||
pytest==8.3.4
|
||||
pytest-asyncio==0.25.2
|
||||
|
||||
-e ./debugger
|
||||
+9
-2
@@ -38,6 +38,14 @@ if [[ ! -x "$PYTHON_BIN" ]]; then
|
||||
python3 -m venv "$VENV_DIR"
|
||||
fi
|
||||
|
||||
# Pinned to project root so:
|
||||
# 1. `from backend.apps...` imports resolve when pytest runs (same as
|
||||
# before — see end of file).
|
||||
# 2. The `-e ./debugger` line in backend/requirements-dev.txt resolves
|
||||
# correctly. pip resolves relative paths in requirements files
|
||||
# relative to CWD, not the requirements file's directory.
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
# --- Ensure pytest is installed (idempotent: only re-installs if missing) -
|
||||
if ! "$PYTHON_BIN" -c "import pytest, pytest_asyncio" >/dev/null 2>&1; then
|
||||
echo "==> Installing backend deps + dev deps into $VENV_DIR"
|
||||
@@ -58,7 +66,6 @@ if [[ "$QUICK" -eq 1 ]]; then
|
||||
echo "==> --quick: DISCONNECT_STRESS_N=$DISCONNECT_STRESS_N"
|
||||
fi
|
||||
|
||||
# Run from project root so `from backend.apps...` imports resolve.
|
||||
cd "$PROJECT_ROOT"
|
||||
# Already cd'd to $PROJECT_ROOT above so `from backend.apps...` resolves.
|
||||
echo "==> Running: pytest ${PYTEST_ARGS[*]}"
|
||||
exec "$PYTHON_BIN" -m pytest "${PYTEST_ARGS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user