name: Tests concurrency: group: bm-ci-${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.ref }} cancel-in-progress: true on: # Trigger: PR branch pushes already publish commit statuses that show up on the PR. # Why: running the full matrix on both push and pull_request doubles CI time for the # exact same branch head commit. # Outcome: each branch push runs the test suite once, including PR updates. push: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" # Required CI records pytest-testmon data but still runs the full selected suite. # The selective mode stays on explicit developer flows such as `just testmon`. BASIC_MEMORY_TESTMON_FLAGS: "--testmon-noselect" jobs: static-checks: name: Static Checks (Python 3.12) timeout-minutes: 20 runs-on: depot-ubuntu-24.04 steps: - uses: actions/checkout@v6 with: submodules: true - name: Set up Python 3.12 uses: actions/setup-python@v6 with: python-version: "3.12" cache: "pip" - name: Install uv run: | pip install uv - uses: extractions/setup-just@v4 - 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: 45 strategy: fail-fast: false matrix: include: - os: depot-ubuntu-24.04 python-version: "3.12" - os: depot-ubuntu-24.04 python-version: "3.13" # Python 3.14 unit tests are the longest full-suite slice; keep this # one on GitHub-hosted runners after Depot terminated it mid-suite. - os: ubuntu-latest python-version: "3.14" - os: windows-latest python-version: "3.12" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 with: submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install uv run: | pip install uv - uses: extractions/setup-just@v4 - name: Cache pytest-testmon results uses: actions/cache@v4 with: path: | .testmondata .testmondata-shm .testmondata-wal key: ${{ runner.os }}-testmon-sqlite-unit-py${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.run_id }} restore-keys: | ${{ runner.os }}-testmon-sqlite-unit-py${{ matrix.python-version }}-${{ github.ref_name }}- ${{ runner.os }}-testmon-sqlite-unit-py${{ matrix.python-version }}-main- ${{ runner.os }}-testmon-sqlite-unit-py${{ matrix.python-version }}- - 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 strategy: fail-fast: false matrix: include: - os: depot-ubuntu-24.04 python-version: "3.12" - os: depot-ubuntu-24.04 python-version: "3.13" - os: depot-ubuntu-24.04 python-version: "3.14" - os: windows-latest python-version: "3.12" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 with: submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install uv run: | pip install uv - uses: extractions/setup-just@v4 - name: Cache pytest-testmon results uses: actions/cache@v4 with: path: | .testmondata .testmondata-shm .testmondata-wal key: ${{ runner.os }}-testmon-sqlite-integration-py${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.run_id }} restore-keys: | ${{ runner.os }}-testmon-sqlite-integration-py${{ matrix.python-version }}-${{ github.ref_name }}- ${{ runner.os }}-testmon-sqlite-integration-py${{ matrix.python-version }}-main- ${{ runner.os }}-testmon-sqlite-integration-py${{ matrix.python-version }}- - 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: 60 strategy: fail-fast: false matrix: include: - python-version: "3.12" os: depot-ubuntu-24.04 - python-version: "3.13" os: depot-ubuntu-24.04 # Match the SQLite unit slice: this full Python 3.14 path outlived # the Depot runner and was terminated mid-suite. - python-version: "3.14" os: ubuntu-latest runs-on: ${{ matrix.os }} services: postgres: image: pgvector/pgvector:pg16 env: POSTGRES_USER: basic_memory_user POSTGRES_PASSWORD: dev_password POSTGRES_DB: basic_memory_test ports: - 5432:5432 options: >- --health-cmd "pg_isready -U basic_memory_user -d basic_memory_test" --health-interval 10s --health-timeout 5s --health-retries 5 env: BASIC_MEMORY_TEST_POSTGRES_URL: postgresql://basic_memory_user:dev_password@127.0.0.1:5432/basic_memory_test steps: - uses: actions/checkout@v6 with: submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install uv run: | pip install uv - uses: extractions/setup-just@v4 - name: Cache pytest-testmon results uses: actions/cache@v4 with: path: | .testmondata .testmondata-shm .testmondata-wal key: ${{ runner.os }}-testmon-postgres-unit-py${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.run_id }} restore-keys: | ${{ runner.os }}-testmon-postgres-unit-py${{ matrix.python-version }}-${{ github.ref_name }}- ${{ runner.os }}-testmon-postgres-unit-py${{ matrix.python-version }}-main- ${{ runner.os }}-testmon-postgres-unit-py${{ matrix.python-version }}- - 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 strategy: fail-fast: false matrix: include: - python-version: "3.12" - python-version: "3.13" - python-version: "3.14" runs-on: depot-ubuntu-24.04 services: postgres: image: pgvector/pgvector:pg16 env: POSTGRES_USER: basic_memory_user POSTGRES_PASSWORD: dev_password POSTGRES_DB: basic_memory_test ports: - 5432:5432 options: >- --health-cmd "pg_isready -U basic_memory_user -d basic_memory_test" --health-interval 10s --health-timeout 5s --health-retries 5 env: BASIC_MEMORY_TEST_POSTGRES_URL: postgresql://basic_memory_user:dev_password@127.0.0.1:5432/basic_memory_test steps: - uses: actions/checkout@v6 with: submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install uv run: | pip install uv - uses: extractions/setup-just@v4 - name: Cache pytest-testmon results uses: actions/cache@v4 with: path: | .testmondata .testmondata-shm .testmondata-wal key: ${{ runner.os }}-testmon-postgres-integration-py${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.run_id }} restore-keys: | ${{ runner.os }}-testmon-postgres-integration-py${{ matrix.python-version }}-${{ github.ref_name }}- ${{ runner.os }}-testmon-postgres-integration-py${{ matrix.python-version }}-main- ${{ runner.os }}-testmon-postgres-integration-py${{ matrix.python-version }}- - 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 runs-on: depot-ubuntu-24.04 steps: - uses: actions/checkout@v6 with: submodules: true - name: Set up Python 3.12 uses: actions/setup-python@v6 with: python-version: "3.12" cache: "pip" - name: Install uv run: | pip install uv - uses: extractions/setup-just@v4 - name: Cache pytest-testmon results uses: actions/cache@v4 with: path: | .testmondata .testmondata-shm .testmondata-wal key: ${{ runner.os }}-testmon-semantic-py3.12-${{ github.ref_name }}-${{ github.run_id }} restore-keys: | ${{ runner.os }}-testmon-semantic-py3.12-${{ github.ref_name }}- ${{ runner.os }}-testmon-semantic-py3.12-main- ${{ runner.os }}-testmon-semantic-py3.12- - name: Create virtual env run: | uv venv - name: Install dependencies run: | uv pip install -e ".[dev]" - name: Run tests run: | just test-semantic