Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Add basic coverage #1741

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion .github/workflows/test-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ jobs:
run: pip3 install .[dev,onnxruntime]
- name: "🔬 Running base tests"
run: make test
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
deepsparse-tests:
runs-on: ubuntu-22.04
env:
Expand All @@ -101,6 +106,11 @@ jobs:
run: pip3 install .[dev,deepsparse,onnxruntime]
- name: "🔬 Running deepsparse tests"
run: make test TARGETS=deepsparse
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
onnx-tests:
runs-on: ubuntu-22.04
env:
Expand All @@ -125,6 +135,11 @@ jobs:
run: pip3 install .[dev,torchvision,onnxruntime]
- name: "🔬 Running onnx tests"
run: make test TARGETS=onnx
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
pytorch-tests:
runs-on: ubuntu-22.04
env:
Expand All @@ -149,6 +164,11 @@ jobs:
run: pip3 install .[dev,torchvision,onnxruntime]
- name: "🔬 Running pytorch tests"
run: make test TARGETS=pytorch
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
compat-pytorch-1_9-pytorch-tests:
runs-on: ubuntu-22.04
env:
Expand All @@ -173,6 +193,11 @@ jobs:
run: pip3 install .[dev,torchvision,onnxruntime] torch==1.9.1
- name: "🔬 Running pytorch tests"
run: make test TARGETS=pytorch
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
compat-pytorch-1_9-onnx-tests:
runs-on: ubuntu-22.04
env:
Expand All @@ -196,4 +221,9 @@ jobs:
- name: "⚙️ Install dependencies"
run: pip3 install .[dev,torchvision,onnxruntime] torch==1.9.1
- name: "🔬 Running onnx tests"
run: make test TARGETS=onnx
run: make test TARGETS=onnx
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ style:
test:
@echo "Running python tests";
SPARSEZOO_TEST_MODE="true" pytest tests $(PYTEST_ARGS) --ignore tests/integrations
pytest --cov=src --cov-report=xml:coverage.xml

# run integration tests
testinteg:
@echo "Running integration tests";
SPARSEZOO_TEST_MODE="true" pytest -x -ls tests/integrations $(PYTEST_INTEGRATION_ARGS)
pytest --cov=src --cov-report=xml:coverage.xml

# create docs
docs:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"sphinx-rtd-theme~=0.5.0",
"wheel>=0.36.2",
"pytest~=6.2.0",
"pytest-cov~=2.11.0",
"pytest-mock~=3.6.0",
"flaky~=3.7.0",
"sphinx-rtd-theme",
Expand Down
Loading