Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
13 changes: 13 additions & 0 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,16 @@ jobs:
run: pip install 'model_api/python/.[full]'
- name: Run pre-commit checks
run: pre-commit run --all-files
Unit-Tests:
runs-on: ubuntu-22.04
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: pip install 'model_api/python/.[tests,ovms]'
- name: Run python unit tests
run: pytest tests/python/unit
14 changes: 8 additions & 6 deletions .github/workflows/test_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Python-Precommit:
runs-on: ubuntu-latest
Python-Functional-Tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: pip
Expand All @@ -25,15 +27,15 @@ jobs:
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install model_api/python/[tests] --extra-index-url https://download.pytorch.org/whl/cpu
pip install model_api/python/[tests,ovms] --extra-index-url https://download.pytorch.org/whl/cpu
- name: Prepare test data
run: |
source venv/bin/activate
python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json
- name: Run test
run: |
source venv/bin/activate
pytest tests/python/precommit
pytest tests/python/funtional
CPP-Code-Quality:
name: CPP-Code-Quality
runs-on: ubuntu-latest
Expand Down
Loading