Skip to content

Commit 24a865f

Browse files
Add CI tests for partial installations
Signed-off-by: Keval Morabia <[email protected]>
1 parent f053d84 commit 24a865f

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Partial Install Unit tests
2+
3+
on:
4+
pull_request:
5+
branches: [main, release/*]
6+
paths:
7+
- ".github/workflows/partial_unit_tests.yml"
8+
- "modelopt/**"
9+
- "tests/**"
10+
- "setup.py"
11+
- "tox.ini"
12+
13+
# Cancel previous runs if new commit is pushed to the same PR
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
partial-unit:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 30
22+
strategy:
23+
matrix:
24+
test-env: [onnx, torch, torch_deploy]
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.12"
30+
- name: Install dependencies
31+
run: pip install tox
32+
- name: Run unit tests
33+
run: tox -e py312-partial-unit-${{ matrix.test-env }}
34+
partial-unit-windows:
35+
runs-on: windows-latest
36+
timeout-minutes: 30
37+
strategy:
38+
matrix:
39+
test-env: [onnx]
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-python@v5
43+
with:
44+
python-version: "3.12"
45+
- name: Install dependencies
46+
run: pip install tox
47+
- name: Run unit tests
48+
run: tox -e py312-partial-unit-${{ matrix.test-env }}

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ commands =
2828
#####################################################################
2929
# Environment to run unit tests with subset of dependencies installed
3030
#####################################################################
31-
[testenv:{py39,py310,py311,py312}-ext-unit-{onnx,torch,torch_deploy}]
31+
[testenv:{py39,py310,py311,py312}-partial-unit-{onnx,torch,torch_deploy}]
3232
allowlist_externals =
3333
bash, rm
3434
deps =

0 commit comments

Comments
 (0)