mirror of
https://github.com/katanemo/plano.git
synced 2026-04-25 16:56:24 +02:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: 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.12"
|
|
|
|
# Step 3: Install Poetry
|
|
- name: Install Poetry
|
|
run: |
|
|
export POETRY_VERSION=1.8.5
|
|
curl -sSL https://install.python-poetry.org | python3 -
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
# Step 4: Install dependencies using Poetry
|
|
- name: Install dependencies
|
|
run: |
|
|
cd model_server
|
|
poetry install
|
|
|
|
# Step 5: Set PYTHONPATH and run tests
|
|
- name: Run model server tests with pytest
|
|
env:
|
|
PYTHONPATH: model_server # Ensure the app's path is available
|
|
run: |
|
|
cd model_server
|
|
poetry run pytest
|