Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 5 additions & 39 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
uv run pytest -n auto -m "need_admin" --reruns 1
5 changes: 5 additions & 0 deletions tests/integration/sdk/sandbox/test_remote_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading