Skip to content

Commit fd17969

Browse files
committed
Use tox for DLCLive compatibility in CI
Replace ad-hoc DLCLive installs in the GitHub Actions job with tox-based testenvs. The workflow fixes Python to 3.12, installs required Qt/OpenGL runtime libs on Ubuntu, installs tox and tox-gh-actions, and runs tox -e matrix.tox_env. tox.ini was extended with dlclive-pypi and dlclive-github testenvs (pypi pinned and GitHub main respectively) to run the compatibility pytest, and the new envs were added to env_list to allow local and CI execution.
1 parent edec653 commit fd17969

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

.github/workflows/testing-ci.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,38 +81,41 @@ jobs:
8181
fail_ci_if_error: false
8282

8383
dlclive-compat:
84-
name: DLCLive Compatibility • ${{ matrix.label }} • py${{ matrix.python }}
84+
name: DLCLive Compatibility • ${{ matrix.label }}
8585
runs-on: ubuntu-latest
8686
strategy:
8787
fail-fast: false
8888
matrix:
89-
python: ['3.12']
9089
include:
9190
- label: pypi-1.1
92-
dlclive_spec: deeplabcut-live==1.1
91+
tox_env: dlclive-pypi
9392
- label: github-main
94-
dlclive_spec: git+https://github.com/DeepLabCut/DeepLabCut-live.git@main
93+
tox_env: dlclive-github
9594

9695
steps:
97-
- name: Checkout
98-
uses: actions/checkout@v6
96+
- uses: actions/checkout@v6
9997

100-
- name: Set up Python
101-
uses: actions/setup-python@v6
98+
- uses: actions/setup-python@v6
10299
with:
103-
python-version: ${{ matrix.python }}
100+
python-version: '3.12'
104101
cache: 'pip'
105102

106-
- name: Install package + test dependencies
103+
- name: Install Qt/OpenGL runtime deps (Ubuntu)
107104
run: |
108-
python -m pip install -U pip wheel
109-
python -m pip install -e .[test]
105+
sudo apt-get update
106+
sudo apt-get install -y \
107+
libegl1 \
108+
libgl1 \
109+
libopengl0 \
110+
libxkbcommon-x11-0 \
111+
libxcb-cursor0
110112
111-
- name: Install matrix DLCLive build
113+
- name: Install tox
112114
run: |
113-
python -m pip install --upgrade --force-reinstall "${{ matrix.dlclive_spec }}"
114-
python -m pip show deeplabcut-live
115+
python -m pip install -U pip wheel
116+
python -m pip install -U tox tox-gh-actions
115117
116-
- name: Run DLCLive compatibility tests
118+
- name: Run DLCLive compatibility tests via tox
119+
shell: bash -eo pipefail {0}
117120
run: |
118-
python -m pytest -m dlclive_compat tests/compat/test_dlclive_package_compat.py -q
121+
tox -e ${{ matrix.tox_env }} -q

tox.ini

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
min_version = 4.0
33
env_list =
44
py{310,311,312}
5+
dlclive-pypi
6+
dlclive-github
57
lint
68
isolated_build = true
79
skip_missing_interpreters = true
@@ -45,6 +47,22 @@ passenv =
4547
; ruff check .
4648
; ruff format --check .
4749

50+
# Run locally : tox -e dlclive-pypi
51+
[testenv:dlclive-pypi]
52+
description = DLCLive compatibility tests against specific PyPi release
53+
deps =
54+
deeplabcut-live==1.1
55+
commands =
56+
pytest -m dlclive_compat tests/compat/test_dlclive_package_compat.py -q
57+
58+
# Run locally : tox -e dlclive-github
59+
[testenv:dlclive-github]
60+
description = DLCLive compatibility tests against GitHub main
61+
deps =
62+
git+https://github.com/DeepLabCut/DeepLabCut-live.git@main
63+
commands =
64+
pytest -m dlclive_compat tests/compat/test_dlclive_package_compat.py -q
65+
4866
[gh-actions]
4967
python =
5068
3.10: py310

0 commit comments

Comments
 (0)