mirror of
https://github.com/katanemo/plano.git
synced 2026-04-26 01:06:25 +02:00
Refactor model server hardware config + add unit tests to load/request to the server (#189)
* remove mode/hardware * add test and pre commit hook * add pytest dependieces * fix format * fix lint * fix precommit * fix pre commit * fix pre commit * fix precommit * fix precommit * fix precommit * fix precommit * fix precommit * fix precommit * fix precommit * fix precommit * fix precommit * fix precommit
This commit is contained in:
parent
3bd2ffe9fb
commit
8e54ac20d8
13 changed files with 480 additions and 43 deletions
38
.github/workflows/model-server-tests.yml
vendored
Normal file
38
.github/workflows/model-server-tests.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: Run Model Server tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # Run tests on pushes to the main branch
|
||||
pull_request:
|
||||
branches:
|
||||
- main # Run tests on pull requests to the main branch
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Step 1: Check out the code from your repository
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Step 2: Set up Python (specify the version)
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10" # Adjust to your Python version
|
||||
|
||||
# Step 3: Install dependencies (from requirements.txt or Pipfile)
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd model_server
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt # Or use pipenv install
|
||||
pip install pytest
|
||||
|
||||
# Step 4: Set PYTHONPATH and run tests
|
||||
- name: Run model server tests with pytest
|
||||
run: |
|
||||
cd model_server
|
||||
PYTHONPATH=. pytest --maxfail=5 --disable-warnings
|
||||
Loading…
Add table
Add a link
Reference in a new issue