diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index ca9b04c4..8bb37d8f 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -8,64 +8,30 @@ on: jobs: test: - runs-on: ubuntu-latest - - strategy: - matrix: - python-version: ["3.11"] - + runs-on: self-hosted steps: - uses: actions/checkout@v4 - - name: Check Docker availability - run: | - echo "=== Checking Docker installation ===" - docker --version - docker info - echo "" - echo "=== Checking Docker daemon status ===" - systemctl status docker --no-pager || true - - - name: Test Docker pull - run: | - echo "=== Attempting to pull python:3.11 image ===" - docker pull python:3.11 - echo "" - echo "=== Verifying pulled image ===" - docker images | grep python - echo "" - echo "=== Testing python:3.11 container ===" - docker run --rm python:3.11 python --version - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install uv - run: | - python -m pip install --upgrade pip - python -m pip install uv - name: Set up project (install dependencies without building) run: | - uv sync --all-extras --group test + uv sync --all-extras --group test --python 3.11 - name: Run fast tests run: | mkdir -p data/logs echo "🚀 Running fast tests..." - uv run pytest -n 4 -m "not need_ray and not need_admin" --reruns 1 + uv run pytest -n auto -m "not need_ray and not need_admin" --reruns 1 - name: Run tests need ray if: success() run: | echo "⚡ Running ray tests..." - uv run pytest -m "need_ray" --reruns 1 + uv run pytest -n auto -m "need_ray" --reruns 1 - name: Run tests need admin if: success() run: | echo "🔐 Running admin tests..." - uv run pytest -n 4 -m "need_admin" --reruns 1 \ No newline at end of file + uv run pytest -n auto -m "need_admin" --reruns 1 \ No newline at end of file diff --git a/tests/integration/sdk/sandbox/test_remote_user.py b/tests/integration/sdk/sandbox/test_remote_user.py index b37cc85b..2b7c1fc3 100644 --- a/tests/integration/sdk/sandbox/test_remote_user.py +++ b/tests/integration/sdk/sandbox/test_remote_user.py @@ -5,16 +5,21 @@ from rock.actions.sandbox.request import CreateBashSessionRequest from rock.actions.sandbox.response import Observation from rock.sdk.sandbox.client import Sandbox +from tests.integration.sdk.sandbox.test_basic import SKIP_IF_NO_DOCKER logger = logging.getLogger(__name__) +@pytest.mark.need_admin +@SKIP_IF_NO_DOCKER @pytest.mark.asyncio async def test_remote_user_create(sandbox_instance: Sandbox): assert await sandbox_instance.remote_user.create_remote_user("rock") assert await sandbox_instance.remote_user.is_user_exist("rock") +@pytest.mark.need_admin +@SKIP_IF_NO_DOCKER @pytest.mark.asyncio async def test_create_session_with_remote_user(sandbox_instance: Sandbox): assert await sandbox_instance.remote_user.create_remote_user("rock")