Skip to content

Commit

Permalink
Add a Python version matrix (3.8-3.10) to GHA jobs (#1114)
Browse files Browse the repository at this point in the history
* Try adding a matrix to our jobs

* Fix format

* Use all python versions

* 3.1 is not real

* Update test-check.yaml

* Update test-check.yaml

* Update test-check.yaml

* Edit haystack reqs
  • Loading branch information
mgoin authored Sep 5, 2023
1 parent cbb8823 commit 5c03631
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
49 changes: 40 additions & 9 deletions .github/workflows/test-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,90 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
SPARSEZOO_TEST_MODE: true
NM_DISABLE_ANALYTICS: "true"

jobs:
base-tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: "neuralmagic/sparsezoo"
path: "sparsezoo"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install sparsezoo dependencies"
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
run: pip install sparsezoo/
- name: "Clean sparsezoo directory"
run: rm -r sparsezoo/
- name: ⚙️ Install dependencies
run: pip3 install .[dev,server,image_classification,transformers,clip] opencv-python
run: pip install .[dev,server,image_classification,transformers,clip] opencv-python
- name: Run base tests
run: make test
cli-smoke-tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: "neuralmagic/sparsezoo"
path: "sparsezoo"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install sparsezoo dependencies"
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
run: pip install sparsezoo/
- name: "Clean sparsezoo directory"
run: rm -r sparsezoo/
- name: ⚙️ Install dependencies
run: pip3 install .[dev,server,image_classification,transformers]
run: pip install .[dev,server,image_classification,transformers]
- name: Run CLI smoke tests
run: PYTEST_ARGS="-m smoke" make test TARGETS=cli,nobase
integrations-tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: "neuralmagic/sparsezoo"
path: "sparsezoo"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install sparsezoo dependencies"
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
run: pip install sparsezoo/
- name: "Clean sparsezoo directory"
run: rm -r sparsezoo/
- name: ⚙️ Install dependencies
run: pip3 install .[dev,server,image_classification,transformers,haystack]
run: pip install .[dev,server,image_classification,transformers,haystack]
- name: Run integrations tests
run: make test_integrations
1 change: 0 additions & 1 deletion src/deepsparse/transformers/haystack/haystack_reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ python-multipart
psutil
pylint
black[jupyter]
pydoc-markdown==4.5.1
mkdocs
jupytercontrib
watchdog
Expand Down

0 comments on commit 5c03631

Please sign in to comment.