isolate tests

This commit is contained in:
Remi Cadene 2024-10-13 18:32:59 +02:00
parent eed7b55fe3
commit daf18dc36e
1 changed files with 8 additions and 6 deletions

View File

@ -47,6 +47,7 @@ jobs:
# pipx install poetry && poetry config virtualenvs.in-project true # pipx install poetry && poetry config virtualenvs.in-project true
# echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH # 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 # - name: Set up Python 3.10
# uses: actions/setup-python@v5 # uses: actions/setup-python@v5
# with: # with:
@ -79,23 +80,24 @@ jobs:
- name: Install apt dependencies - name: Install apt dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install poetry - name: Install poetry
run: | run: |
pipx install poetry && poetry config virtualenvs.in-project true pipx install poetry && poetry config virtualenvs.in-project true
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH 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"
- name: Install poetry dependencies - name: Install poetry dependencies
run: | run: |
poetry install --extras "test" poetry install --extras "test"
- name: Test with pytest - name: Test with pytest
run: | run: |
pytest -sx 'tests/test_control_robot.py::test_record_and_replay_and_policy[koch-True]' -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::DeprecationWarning:imageio_ffmpeg._utils:7 \
-W ignore::UserWarning:torch.utils.data.dataloader:558 \ -W ignore::UserWarning:torch.utils.data.dataloader:558 \
-W ignore::UserWarning:gymnasium.utils.env_checker:247 \ -W ignore::UserWarning:gymnasium.utils.env_checker:247 \