mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
3a2b80b7e9
The coverage collection had multiple issues: - Wrong pytest markers caused 0 tests to run - Postgres jobs silently skipped artifact uploads - Coverage Summary job failed when artifacts were missing - uv venv picked wrong Python version for coverage jobs Simplify: every job just runs tests via `just` recipes. No more dual code paths, artifact uploads, or summary aggregation job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
268 lines
5.9 KiB
YAML
268 lines
5.9 KiB
YAML
name: Tests
|
|
|
|
concurrency:
|
|
group: bm-ci-${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
static-checks:
|
|
name: Static Checks (Python 3.12)
|
|
timeout-minutes: 20
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
cache: "pip"
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- uses: extractions/setup-just@v3
|
|
|
|
- name: Create virtual env
|
|
run: |
|
|
uv venv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install -e ".[dev]"
|
|
|
|
- name: Run type checks
|
|
run: |
|
|
just typecheck
|
|
|
|
- name: Run linting
|
|
run: |
|
|
just lint
|
|
|
|
test-sqlite-unit:
|
|
name: Test SQLite Unit (${{ matrix.os }}, Python ${{ matrix.python-version }})
|
|
timeout-minutes: 30
|
|
needs: [static-checks]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
python-version: "3.12"
|
|
- os: ubuntu-latest
|
|
python-version: "3.13"
|
|
- os: ubuntu-latest
|
|
python-version: "3.14"
|
|
- os: windows-latest
|
|
python-version: "3.12"
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- uses: extractions/setup-just@v3
|
|
|
|
- name: Create virtual env
|
|
run: |
|
|
uv venv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
just test-unit-sqlite
|
|
|
|
test-sqlite-integration:
|
|
name: Test SQLite Integration (${{ matrix.os }}, Python ${{ matrix.python-version }})
|
|
timeout-minutes: 45
|
|
needs: [static-checks]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
python-version: "3.12"
|
|
- os: ubuntu-latest
|
|
python-version: "3.13"
|
|
- os: ubuntu-latest
|
|
python-version: "3.14"
|
|
- os: windows-latest
|
|
python-version: "3.12"
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- uses: extractions/setup-just@v3
|
|
|
|
- name: Create virtual env
|
|
run: |
|
|
uv venv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
just test-int-sqlite
|
|
|
|
test-postgres-unit:
|
|
name: Test Postgres Unit (Python ${{ matrix.python-version }})
|
|
timeout-minutes: 30
|
|
needs: [static-checks]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- python-version: "3.12"
|
|
- python-version: "3.13"
|
|
- python-version: "3.14"
|
|
runs-on: ubuntu-latest
|
|
|
|
# Note: No services section needed - testcontainers handles Postgres in Docker
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- uses: extractions/setup-just@v3
|
|
|
|
- name: Create virtual env
|
|
run: |
|
|
uv venv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
just test-unit-postgres
|
|
|
|
test-postgres-integration:
|
|
name: Test Postgres Integration (Python ${{ matrix.python-version }})
|
|
timeout-minutes: 45
|
|
needs: [static-checks]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- python-version: "3.12"
|
|
- python-version: "3.13"
|
|
- python-version: "3.14"
|
|
runs-on: ubuntu-latest
|
|
|
|
# Note: No services section needed - testcontainers handles Postgres in Docker
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- uses: extractions/setup-just@v3
|
|
|
|
- name: Create virtual env
|
|
run: |
|
|
uv venv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
just test-int-postgres
|
|
|
|
test-semantic:
|
|
name: Test Semantic (Python 3.12)
|
|
timeout-minutes: 45
|
|
needs: [static-checks]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.12"
|
|
cache: "pip"
|
|
|
|
- name: Install uv
|
|
run: |
|
|
pip install uv
|
|
|
|
- uses: extractions/setup-just@v3
|
|
|
|
- name: Create virtual env
|
|
run: |
|
|
uv venv
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install -e ".[dev]"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
just test-semantic
|