Skip to content

Timeline UX + multi-file memory viewer + captain-hook v2.1.92 expansion #313

Timeline UX + multi-file memory viewer + captain-hook v2.1.92 expansion

Timeline UX + multi-file memory viewer + captain-hook v2.1.92 expansion #313

Workflow file for this run

name: API Tests
on:
push:
branches: [main]
paths: ['api/**']
pull_request:
branches: [main]
paths: ['api/**']
jobs:
test:
name: Python Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: api/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with coverage
run: |
pytest tests/ --ignore=tests/api/ -v --cov=models --cov-report=xml --cov-report=term-missing
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.11'
with:
file: ./api/coverage.xml
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
api-test:
name: API Integration Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: api/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install -r requirements.txt
pip install httpx pytest-asyncio
- name: Run API tests
run: |
pytest tests/api/ -v
cross-platform-test:
name: Cross-Platform Path Tests
defaults:
run:
working-directory: api
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: api/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
pip install -r requirements.txt
pip install httpx pytest-asyncio
- name: Run cross-platform path tests
run: |
pytest tests/test_project.py tests/test_cross_platform_paths.py -v
lint:
name: Python Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: api/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff linter
run: ruff check models/ routers/ tests/
- name: Run Ruff formatter check
run: ruff format --check models/ routers/ tests/