Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,84 @@ jobs:
- name: Test ${{ matrix.package }}
run: cd ./${{ matrix.package }} && pnpm test
env: ${{ matrix.env }}

# =========================================================================
# TIER 4 – Ollama tests (PostgreSQL + Ollama)
# =========================================================================
ollama-tests:
needs: build
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 15

env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: password
OLLAMA_BASE_URL: http://localhost:11434

services:
pg_db:
image: ghcr.io/constructive-io/docker/postgres-plus:18
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

ollama:
image: ollama/ollama:latest
ports:
- 11434:11434
options: >-
--health-cmd "bash -c 'cat < /dev/null > /dev/tcp/localhost/11434'"
--health-interval 10s
--health-timeout 5s
--health-retries 10
--health-start-period 10s

steps:
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: workspace-build

- name: Extract workspace
run: tar -xzf workspace.tar.gz && rm workspace.tar.gz

- name: Configure Git (for tests)
run: |
git config --global user.name "CI Test User"
git config --global user.email "ci@example.com"

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Seed app_user
run: |
pnpm --filter pgpm exec node dist/index.js admin-users bootstrap --yes
pnpm --filter pgpm exec node dist/index.js admin-users add --test --yes

- name: Pull Ollama models
run: |
curl -s http://localhost:11434/api/pull -d '{"name":"nomic-embed-text:latest"}' | tail -1
echo "nomic-embed-text pulled"

- name: Test graphile-llm metering
run: cd ./graphile/graphile-llm && npx jest metering-e2e --verbose
Loading
Loading