Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
81 changes: 77 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ jobs:
- name: Install dependencies
run: uv sync --group tests --frozen
- name: Run tests
run: uv run pytest --numprocesses=3 --cov=dimos/ --junitxml=junit.xml -m 'not (tool or self_hosted or mujoco or dimsim)'
run: uv run pytest --numprocesses=3 --cov=dimos/ --junitxml=junit.xml -m 'not (tool or self_hosted or mujoco or self_hosted_large)'
- name: Re-run the failing tests with maximum verbosity
if: failure()
env:
COLOR: yes
run: >- # `exit 1` makes sure that the job remains red with flaky runs
uv run pytest --no-cov -vvvvv --lf -m 'not (tool or self_hosted or mujoco or dimsim)' && exit 1
uv run pytest --no-cov -vvvvv --lf -m 'not (tool or self_hosted or mujoco or self_hosted_large)' && exit 1
shell: bash
- name: Turn coverage into xml
run: uv run python -m coverage xml
Expand Down Expand Up @@ -254,7 +254,8 @@ jobs:
container: ${{ matrix.container }}

steps:
- uses: actions/checkout@v5
- name: Checkout
uses: actions/checkout@v6
with:
clean: false
# If we ever allow external PRs on custom runner, persisting credentials
Expand Down Expand Up @@ -320,6 +321,75 @@ jobs:
run: |
df -h

self-hosted-large-tests:
# Skip on PRs from forks which would expose the self-hosted runner to untrusted code from external contributors.
if: |
github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
timeout-minutes: 30
runs-on: [self-hosted-large, Linux, 32gb, gpu, nvidia]
Comment thread
Dreamsorcerer marked this conversation as resolved.
Outdated
permissions:
contents: read # For checkout
packages: read # For pulling the ros-dev container from ghcr.io
id-token: write # For codecov-action's OIDC upload

steps:
- name: Checkout
uses: actions/checkout@v6
with:
clean: false
# If we ever allow external PRs on custom runner, persisting credentials
# could be abused by attackers.
persist-credentials: false
- name: Fix permissions
run: |
git config --global --add safe.directory '*'
git clean -ffdx
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libgl1 libturbojpeg portaudio19-dev
- name: Install dependencies
run: uv sync --group tests-self-hosted --frozen
- name: Build C++ extensions in-place
run: uv run python setup.py build_ext --inplace
- name: Run tests
run: uv run pytest --cov=dimos/ --junitxml=junit.xml -m self_hosted_large
- name: Re-run the failing tests with maximum verbosity
if: failure()
env:
COLOR: yes
run: >- # `exit 1` makes sure that the job remains red with flaky runs
uv run pytest --no-cov -vvvvv --lf -m self_hosted_large && exit 1
shell: bash
- name: Turn coverage into xml
run: uv run python -m coverage xml
- name: Upload coverage
uses: codecov/codecov-action@v6
with:
disable_search: true
fail_ci_if_error: true
files: ./coverage.xml
flags: SelfHosted-Large
use_oidc: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v6
with:
report_type: test_results
use_oidc: true
- name: Check disk space
if: failure()
run: |
df -h

# Cross-job fail-fast: GitHub Actions only fail-fasts within a matrix,
# not across sibling jobs. This watcher fires the moment `tests` fails
# and cancels the whole workflow run.
Expand All @@ -345,6 +415,7 @@ jobs:
- docs-validate
- tests
- self-hosted-tests
- self-hosted-large-tests

runs-on: ubuntu-latest
permissions:
Expand All @@ -354,7 +425,9 @@ jobs:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: self-hosted-tests
allowed-skips: |
self-hosted-tests
self-hosted-large-tests
jobs: ${{ toJSON(needs) }}
- name: Trigger Codecov notifications
uses: codecov/codecov-action@v6
Expand Down
4 changes: 3 additions & 1 deletion dimos/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def pytest_configure(config):
"self_hosted: tests that need the self-hosted runner (LFS, ROS, CUDA, etc.)",
)
config.addinivalue_line("markers", "mujoco: tests which open mujoco")
config.addinivalue_line("markers", "dimsim: tests which require dimsim")
config.addinivalue_line(
"markers", "self_hosted_large: tests that need a high-memory self-hosted runner"
)
config.addinivalue_line("markers", "skipif_in_ci: skip when CI env var is set")
config.addinivalue_line("markers", "skipif_no_openai: skip when OPENAI_API_KEY is not set")
config.addinivalue_line("markers", "skipif_no_alibaba: skip when ALIBABA_API_KEY is not set")
Expand Down
2 changes: 1 addition & 1 deletion dimos/e2e_tests/test_dimsim_path_replaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytest


@pytest.mark.dimsim
@pytest.mark.self_hosted_large
def test_path_replanning(
lcm_spy, start_blueprint, dim_sim, direct_cmd_vel_explorer, spawn_wall_on_pose
) -> None:
Expand Down
2 changes: 1 addition & 1 deletion dimos/e2e_tests/test_dimsim_spatial_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytest


@pytest.mark.dimsim
@pytest.mark.self_hosted_large
def test_go_to_the_bed(lcm_spy, start_blueprint, human_input, dim_sim, explore_house) -> None:
start_blueprint(
"run",
Expand Down
2 changes: 1 addition & 1 deletion dimos/e2e_tests/test_dimsim_walk_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytest


@pytest.mark.dimsim
@pytest.mark.self_hosted_large
def test_walk_forward(lcm_spy, start_blueprint, human_input, dim_sim) -> None:
start_blueprint(
"run",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ env = [
"GOOGLE_MAPS_API_KEY=AIzafake_google_key",
"PYTHONWARNINGS=ignore:cupyx.jit.rawkernel is experimental:FutureWarning",
]
addopts = "--dist=loadfile --durations=10 --timeout=600 --timeout-method=thread -v -ra --showlocals --cov-report=xml -p no:launch_testing -p no:launch_ros --import-mode=importlib --color=yes -m 'not (tool or self_hosted or mujoco or dimsim)'"
addopts = "--dist=loadfile --durations=10 --timeout=600 --timeout-method=thread -v -ra --showlocals --cov-report=xml -p no:launch_testing -p no:launch_ros --import-mode=importlib --color=yes -m 'not (tool or self_hosted or mujoco or self_hosted_large)'"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"

Expand Down
Loading