llama-stack-mirror/.github/workflows/unit-tests.yml
Nathan Weinberg 1a13bd2c6c test: loosen Python 3.10 version for unit tests
it shouldn't be nessessary to tie the unit test
runner to an exact z-stream of Python 3.10

updated so unit test runner always uses latest
z-stream of Python 3.10

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
2025-03-11 10:57:55 -04:00

36 lines
857 B
YAML

name: Unit Tests
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
enable-cache: false
- name: Run unit tests
run: |
uv run -p 3.10 --with-editable . --with-editable ".[dev]" --with-editable ".[unit]" pytest --cov=llama_stack -s -v tests/unit/ --junitxml=pytest-report.xml
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
.pytest_cache/
pytest-report.xml
retention-days: 7