From 939ec7bd3b13e667184337378a6f7736a212cc25 Mon Sep 17 00:00:00 2001 From: Albert Li Date: Wed, 10 Sep 2025 13:28:25 -0700 Subject: [PATCH] Fix smoketest working directory --- .github/workflows/smoketests.yml | 10 +++++----- tests/smoketests/test_devboxes.py | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/smoketests.yml b/.github/workflows/smoketests.yml index d1d3999ef..aaf97d7a7 100644 --- a/.github/workflows/smoketests.yml +++ b/.github/workflows/smoketests.yml @@ -12,12 +12,9 @@ on: - prod jobs: - smoke: + smoketests: runs-on: ubuntu-latest timeout-minutes: 120 - defaults: - run: - working-directory: api-client-python steps: - name: Checkout uses: actions/checkout@v4 @@ -27,6 +24,9 @@ jobs: with: python-version: "3.11" + - name: Create virtualenv + run: uv venv + - name: Install dependencies run: | uv pip install -r requirements-dev.lock @@ -45,7 +45,7 @@ jobs: fi echo "DEBUG=false" >> $GITHUB_ENV echo "RUN_SMOKETESTS=1" >> $GITHUB_ENV - echo "PYTHONPATH=${{ github.workspace }}/api-client-python/src" >> $GITHUB_ENV + echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV - name: Run smoke tests (pytest via uv) env: diff --git a/tests/smoketests/test_devboxes.py b/tests/smoketests/test_devboxes.py index 3ce930698..e6f4cd579 100644 --- a/tests/smoketests/test_devboxes.py +++ b/tests/smoketests/test_devboxes.py @@ -53,14 +53,15 @@ def test_shutdown_devbox() -> None: assert view.status == "shutdown" -@pytest.mark.timeout(30) +@pytest.mark.timeout(90) def test_create_and_await_running_long_set_up() -> None: created = client.devboxes.create_and_await_running( name=unique_name("smoketest-devbox-await-running-long-set-up"), - launch_parameters={"launch_commands": ["sleep 70"], "keep_alive_time_seconds": 30}, + launch_parameters={"launch_commands": ["sleep 70"]}, polling_config=PollingConfig(interval_seconds=5.0, timeout_seconds=80), ) assert created.status == "running" + client.devboxes.shutdown(created.id) @pytest.mark.timeout(30) @@ -68,6 +69,6 @@ def test_create_and_await_running_timeout() -> None: with pytest.raises(PollingTimeout): client.devboxes.create_and_await_running( name=unique_name("smoketest-devbox-await-running-timeout"), - launch_parameters={"launch_commands": ["sleep 70"], "keep_alive_time_seconds": 30}, + launch_parameters={"launch_commands": ["sleep 70"]}, polling_config=PollingConfig(max_attempts=1, interval_seconds=0.1), )