Merge pull request #3 from IshaanRSharma/feat/deploy-demo-and-api-fixes #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: lint · types · tests (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Sync dependencies (all extras + dev) | |
| run: uv sync --all-extras --python ${{ matrix.python-version }} | |
| - name: Ruff (lint + import order) | |
| run: uv run ruff check src tests eval | |
| - name: Mypy (strict) | |
| run: uv run mypy | |
| - name: Pytest | |
| run: uv run pytest -q | |
| postgres: | |
| name: Postgres parity | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: dexta | |
| POSTGRES_PASSWORD: dexta | |
| POSTGRES_DB: dexta | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U dexta -d dexta" | |
| --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Sync (postgres extra + dev) | |
| run: uv sync --extra postgres --python 3.12 | |
| - name: Postgres parity tests | |
| env: | |
| TEST_DATABASE_URL: postgresql://dexta:dexta@localhost:5432/dexta | |
| run: uv run pytest tests/test_postgres_store.py -q | |
| docker: | |
| name: Docker image builds | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build the reference image | |
| run: docker build -t dexta-intelligence:ci . | |
| - name: Smoke the demo seed (no server) | |
| run: | | |
| docker run --rm dexta-intelligence:ci \ | |
| python -c "from dexta_intelligence.demo import build_demo_store; s=build_demo_store(); assert s.coverage().first_ts is not None; print('demo store OK')" |