feat: adapter-owns-storage + CF native metadata filtering #198
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, develop] | |
| pull_request: | |
| branches: [main, split_db_adapter] | |
| jobs: | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Type check all packages | |
| run: pnpm build:types:all | |
| test_int: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg15 | |
| env: | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: payload_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5433:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Install pgvector extension | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-client | |
| PGPASSWORD=password psql -h localhost -p 5433 -U postgres -d payload_test -c "CREATE EXTENSION IF NOT EXISTS vector;" | |
| - name: Run Vitest integration tests | |
| run: pnpm test:int | |
| env: | |
| PAYLOAD_SECRET: test-secret-key | |
| DIMS: 8 | |
| IVFFLATLISTS: 1 | |
| TEST_ENV: 1 | |
| test_adapters_pg: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg15 | |
| env: | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: payload_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5433:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Install pgvector extension | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-client | |
| PGPASSWORD=password psql -h localhost -p 5433 -U postgres -d payload_test -c "CREATE EXTENSION IF NOT EXISTS vector;" | |
| - name: Run pg adapter tests | |
| run: pnpm test:adapters:pg | |
| env: | |
| PAYLOAD_SECRET: test-secret-key | |
| DIMS: 8 | |
| IVFFLATLISTS: 1 | |
| TEST_ENV: 1 | |
| test_adapters_cf: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg15 | |
| env: | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: payload_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5433:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run cf adapter tests | |
| run: pnpm test:adapters:cf | |
| env: | |
| PAYLOAD_SECRET: test-secret-key | |
| TEST_ENV: 1 | |
| test_e2e: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg15 | |
| env: | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: payload_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5433:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Install Playwright browsers | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Install pgvector extension | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql-client | |
| PGPASSWORD=password psql -h localhost -p 5433 -U postgres -d payload_test -c "CREATE EXTENSION IF NOT EXISTS vector;" | |
| - name: Run Playwright e2e tests | |
| run: pnpm test:e2e | |
| env: | |
| PAYLOAD_SECRET: test-secret-key | |
| DIMS: 8 | |
| IVFFLATLISTS: 1 | |
| TEST_ENV: 1 | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: [typecheck, test_int, test_adapters_pg, test_adapters_cf, test_e2e] | |
| if: always() | |
| steps: | |
| - name: Check required jobs | |
| run: | | |
| if [ "${{ needs.typecheck.result }}" != "success" ] || \ | |
| [ "${{ needs.test_int.result }}" != "success" ] || \ | |
| [ "${{ needs.test_adapters_pg.result }}" != "success" ] || \ | |
| [ "${{ needs.test_adapters_cf.result }}" != "success" ] || \ | |
| [ "${{ needs.test_e2e.result }}" != "success" ]; then | |
| echo "One or more required jobs failed" | |
| exit 1 | |
| fi |