ci: simplify CLI tests workflow to single Python version and add missing dependencies
- Remove Python version matrix (3.10, 3.11, 3.12), run only on 3.11 - Add aitbc-crypto package installation - Add coordinator dependencies (fastapi, uvicorn, sqlmodel, etc.) - Add pytest-asyncio for async test support - Remove conditional coverage steps (always run on 3.11 now)
This commit is contained in:
14
.github/workflows/cli-tests.yml
vendored
14
.github/workflows/cli-tests.yml
vendored
@@ -15,35 +15,31 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: ['3.10', '3.11', '3.12']
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: '3.11'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -e .
|
pip install -e .
|
||||||
pip install pytest pytest-cov
|
pip install -e packages/py/aitbc-crypto
|
||||||
|
pip install fastapi uvicorn sqlmodel pydantic-settings aiosqlite slowapi orjson prometheus-client
|
||||||
|
pip install pytest pytest-cov pytest-asyncio
|
||||||
|
|
||||||
- name: Run CLI tests
|
- name: Run CLI tests
|
||||||
run: |
|
run: |
|
||||||
python -m pytest tests/cli/ -v --tb=short --disable-warnings
|
python -m pytest tests/cli/ -v --tb=short --disable-warnings
|
||||||
|
|
||||||
- name: Run CLI tests with coverage
|
- name: Run CLI tests with coverage
|
||||||
if: matrix.python-version == '3.11'
|
|
||||||
run: |
|
run: |
|
||||||
python -m pytest tests/cli/ --cov=aitbc_cli --cov-report=term-missing --cov-report=xml
|
python -m pytest tests/cli/ --cov=aitbc_cli --cov-report=term-missing --cov-report=xml
|
||||||
|
|
||||||
- name: Upload coverage
|
- name: Upload coverage
|
||||||
if: matrix.python-version == '3.11'
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage-report
|
name: coverage-report
|
||||||
|
|||||||
Reference in New Issue
Block a user