From 8e75f61b31e545067367ee3701d6d754cb354876 Mon Sep 17 00:00:00 2001 From: Steven Palma Date: Sun, 12 Apr 2026 14:11:50 +0200 Subject: [PATCH] update fast ci tests --- .github/workflows/fast_tests.yml | 38 +++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fast_tests.yml b/.github/workflows/fast_tests.yml index d78bdd21b..b6680db73 100644 --- a/.github/workflows/fast_tests.yml +++ b/.github/workflows/fast_tests.yml @@ -12,7 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This workflow handles fast testing. +# This workflow validates each optional-dependency tier in isolation. +# Each tier installs a different extra and runs the full test suite. +# Tests that require an extra not installed in the current tier are +# skipped automatically via pytest.importorskip guards. name: Fast Tests on: @@ -54,8 +57,9 @@ concurrency: cancel-in-progress: true jobs: - # This job runs pytests with the default dependencies. - # It runs everytime we commit to a PR or push to main + # This job runs pytests in isolated dependency tiers. + # Each tier installs a different extra and runs the full suite; + # tests gated behind other extras skip automatically. fast-pytest-tests: name: Fast Pytest Tests runs-on: ubuntu-latest @@ -89,8 +93,9 @@ jobs: version: ${{ env.UV_VERSION }} python-version: ${{ env.PYTHON_VERSION }} - - name: Install lerobot with test extras - run: uv sync --locked --extra "test" + # ── Tier 1: Base ────────────────────────────────────── + - name: "Tier 1 — Install: base" + run: uv sync --locked --extra test - name: Login to Hugging Face if: env.HF_USER_TOKEN != '' @@ -98,5 +103,26 @@ jobs: uv run hf auth login --token "$HF_USER_TOKEN" --add-to-git-credential uv run hf auth whoami - - name: Run pytest + - name: "Tier 1 — Test: base" + run: uv run pytest tests -vv --maxfail=10 + + # ── Tier 2: Dataset ────────────────────────────────── + - name: "Tier 2 — Install: dataset" + run: uv sync --locked --extra test --extra dataset + + - name: "Tier 2 — Test: dataset" + run: uv run pytest tests -vv --maxfail=10 + + # ── Tier 3: Hardware ───────────────────────────────── + - name: "Tier 3 — Install: hardware" + run: uv sync --locked --extra test --extra hardware + + - name: "Tier 3 — Test: hardware" + run: uv run pytest tests -vv --maxfail=10 + + # ── Tier 4: Viz ────────────────────────────────────── + - name: "Tier 4 — Install: viz" + run: uv sync --locked --extra test --extra viz + + - name: "Tier 4 — Test: viz" run: uv run pytest tests -vv --maxfail=10