mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-23 20:50:02 +00:00
update fast ci tests
This commit is contained in:
@@ -12,7 +12,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
name: Fast Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -54,8 +57,9 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# This job runs pytests with the default dependencies.
|
# This job runs pytests in isolated dependency tiers.
|
||||||
# It runs everytime we commit to a PR or push to main
|
# Each tier installs a different extra and runs the full suite;
|
||||||
|
# tests gated behind other extras skip automatically.
|
||||||
fast-pytest-tests:
|
fast-pytest-tests:
|
||||||
name: Fast Pytest Tests
|
name: Fast Pytest Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -89,8 +93,9 @@ jobs:
|
|||||||
version: ${{ env.UV_VERSION }}
|
version: ${{ env.UV_VERSION }}
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Install lerobot with test extras
|
# ── Tier 1: Base ──────────────────────────────────────
|
||||||
run: uv sync --locked --extra "test"
|
- name: "Tier 1 — Install: base"
|
||||||
|
run: uv sync --locked --extra test
|
||||||
|
|
||||||
- name: Login to Hugging Face
|
- name: Login to Hugging Face
|
||||||
if: env.HF_USER_TOKEN != ''
|
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 login --token "$HF_USER_TOKEN" --add-to-git-credential
|
||||||
uv run hf auth whoami
|
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
|
run: uv run pytest tests -vv --maxfail=10
|
||||||
|
|||||||
Reference in New Issue
Block a user