Skip to content

Commit

Permalink
Update Make file
Browse files Browse the repository at this point in the history
Add pytest cov in dev dependencies
  • Loading branch information
rahul-tuli committed Sep 29, 2023
1 parent d7dc92e commit 960ee76
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .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,14 +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
coverage:
runs-on: ubuntu-latest
steps:
- run: pytest --cov=src --cov-report=xml:coverage.xml

run: make test TARGETS=onnx
- name: Report Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
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

0 comments on commit 960ee76

Please sign in to comment.