fix: add eth-account dependency to resolve import error
DEPENDENCY FIX: Add missing eth_account module for Guardian Contract tests Issue Fixed: ❌ ModuleNotFoundError: No module named 'eth_account' ❌ ImportError in test_guardian_contract.py ❌ Guardian Contract tests failing to collect Root Cause: - Guardian Contract imports eth_account.Account - eth_account module not installed in CI environment - Missing dependency in workflow setup Solution Applied: ✅ Added eth-account to additional dependencies ✅ Updated both main test job and specific test job ✅ Ensures Guardian Contract tests can import properly Changes Made: 1. Main Test Dependencies: - Added eth-account to venv/bin/pip install line - Fixed for all Python test scenarios 2. Specific Test Job: - Added eth-account to specific test job dependencies - Ensures consistency across all test runs Impact: - Guardian Contract tests now import successfully - No more ModuleNotFoundError for eth_account - All Python tests can run properly - Test collection works without errors This resolves the import error that was preventing Guardian Contract tests from running in the CI/CD environment.
This commit is contained in:
@@ -95,7 +95,7 @@ jobs:
|
||||
echo "=== ADDITIONAL DEPENDENCIES ==="
|
||||
# Install missing dependencies that cause import errors
|
||||
echo "Installing additional test dependencies..."
|
||||
venv/bin/pip install pydantic-settings sqlmodel sqlalchemy requests slowapi
|
||||
venv/bin/pip install pydantic-settings sqlmodel sqlalchemy requests slowapi eth-account
|
||||
|
||||
echo "=== PYTHON PATH SETUP ==="
|
||||
# Set up comprehensive Python path for complex import patterns
|
||||
@@ -236,7 +236,7 @@ jobs:
|
||||
python3 -m venv venv && source venv/bin/activate
|
||||
$POETRY_CMD lock || echo "Lock file update completed"
|
||||
$POETRY_CMD install --no-root
|
||||
venv/bin/pip install pydantic-settings sqlmodel sqlalchemy requests slowapi pytest pytest-cov pytest-mock
|
||||
venv/bin/pip install pydantic-settings sqlmodel sqlalchemy requests slowapi pytest pytest-cov pytest-mock eth-account
|
||||
|
||||
export PYTHONPATH="/opt/gitea-runner/workspace/repo:$PYTHONPATH"
|
||||
export PYTHONPATH="/opt/gitea-runner/workspace/repo/aitbc:$PYTHONPATH"
|
||||
|
||||
Reference in New Issue
Block a user