More CI cleanup, add style workflow (#107)
- Changes on the `test.yml` workflow: - Using poetry instead of pip. Contrary to what I wrote in #75, it is possible to use poetry (and have the benefits of shorter install times) without the need for having two separate versions of `pyproject.toml` and `poetry.lock`. - Reduce the trigger scope to only run when files in these directories are modified: - `lerobot/` - `tests/` - `examples/` - `.github/` - Add `style.yml` workflow for doing a `ruff check` pass on the code - More cleanup (removed deprecated workflow)
This commit is contained in:
33
.github/workflows/test.yml
vendored
33
.github/workflows/test.yml
vendored
@@ -4,9 +4,19 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "lerobot/**"
|
||||
- "tests/**"
|
||||
- "examples/**"
|
||||
- ".github/**"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "lerobot/**"
|
||||
- "tests/**"
|
||||
- "examples/**"
|
||||
- ".github/**"
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
@@ -21,26 +31,27 @@ jobs:
|
||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
- name: Install EGL
|
||||
run: sudo apt-get update && sudo apt-get install -y libegl1-mesa-dev
|
||||
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry && poetry config virtualenvs.in-project true
|
||||
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
cache: ${{ (github.ref == 'refs/heads/main') && 'pip' || '' }}
|
||||
cache-dependency-path: pyproject.toml
|
||||
cache: "poetry"
|
||||
|
||||
- name: Install EGL
|
||||
run: sudo apt-get update && sudo apt-get install -y libegl1-mesa-dev
|
||||
|
||||
- name: Install pip dependencies
|
||||
- name: Install poetry dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[test, aloha, xarm, pusht]"
|
||||
poetry install --all-extras
|
||||
|
||||
- name: Test with pytest
|
||||
run: pytest -v --cov=./lerobot tests
|
||||
run: pytest -v --cov=./lerobot --durations=0 tests
|
||||
|
||||
- name: Test end-to-end
|
||||
run: make test-end-to-end
|
||||
|
||||
Reference in New Issue
Block a user