Skip to content

Commit

Permalink
isolate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadene committed Oct 24, 2024
1 parent 4d03ece commit 8d62464
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,46 @@ on:
- ".cache/**"

jobs:
pytest:
name: Pytest
runs-on: ubuntu-latest
env:
DATA_DIR: tests/data
MUJOCO_GL: egl
steps:
- uses: actions/checkout@v4
with:
lfs: true # Ensure LFS files are pulled

- name: Install apt dependencies
# portaudio19-dev is needed to install pyaudio
run: |
sudo apt-get update && \
sudo apt-get install -y libegl1-mesa-dev ffmpeg portaudio19-dev
- name: Install poetry
run: |
pipx install poetry && poetry config virtualenvs.in-project true
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
# TODO(rcadene, aliberts): python 3.12 seems to be used in the tests, not python 3.10
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "poetry"

- name: Install poetry dependencies
run: |
poetry install --all-extras
- name: Test with pytest
run: |
pytest tests -v --cov=./lerobot --durations=0 \
-W ignore::DeprecationWarning:imageio_ffmpeg._utils:7 \
-W ignore::UserWarning:torch.utils.data.dataloader:558 \
-W ignore::UserWarning:gymnasium.utils.env_checker:247 \
&& rm -rf tests/outputs outputs
# pytest:
# name: Pytest
# runs-on: ubuntu-latest
# env:
# DATA_DIR: tests/data
# MUJOCO_GL: egl
# steps:
# - uses: actions/checkout@v4
# with:
# lfs: true # Ensure LFS files are pulled

# - name: Install apt dependencies
# # portaudio19-dev is needed to install pyaudio
# run: |
# sudo apt-get update && \
# sudo apt-get install -y libegl1-mesa-dev ffmpeg portaudio19-dev

# - name: Install poetry
# run: |
# pipx install poetry && poetry config virtualenvs.in-project true
# echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH

# # TODO(rcadene, aliberts): python 3.12 seems to be used in the tests, not python 3.10
# - name: Set up Python 3.10
# uses: actions/setup-python@v5
# with:
# python-version: "3.10"
# cache: "poetry"

# - name: Install poetry dependencies
# run: |
# poetry install --all-extras

# - name: Test with pytest
# run: |
# pytest tests -v --cov=./lerobot --durations=0 \
# -W ignore::DeprecationWarning:imageio_ffmpeg._utils:7 \
# -W ignore::UserWarning:torch.utils.data.dataloader:558 \
# -W ignore::UserWarning:gymnasium.utils.env_checker:247 \
# && rm -rf tests/outputs outputs

pytest-minimal:
name: Pytest (minimal install)
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Test with pytest
run: |
pytest tests -v --cov=./lerobot --durations=0 \
pytest tests/test_control_robot.py -v --cov=./lerobot --durations=0 \
-W ignore::DeprecationWarning:imageio_ffmpeg._utils:7 \
-W ignore::UserWarning:torch.utils.data.dataloader:558 \
-W ignore::UserWarning:gymnasium.utils.env_checker:247 \
Expand Down

0 comments on commit 8d62464

Please sign in to comment.