|
1 | | -name: CI |
| 1 | +name: ci |
2 | 2 |
|
3 | 3 | on: |
| 4 | + pull_request: |
4 | 5 | push: |
5 | 6 | branches: [main] |
6 | | - pull_request: |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - test: |
| 9 | + check: |
10 | 10 | runs-on: ubuntu-latest |
| 11 | + timeout-minutes: 15 |
11 | 12 | services: |
12 | 13 | postgres: |
13 | 14 | image: pgvector/pgvector:pg17 |
14 | | - env: |
15 | | - POSTGRES_PASSWORD: memory-test |
16 | | - ports: |
17 | | - - 5432:5432 |
| 15 | + env: { POSTGRES_PASSWORD: postgres, POSTGRES_DB: memory } |
| 16 | + ports: ["5432:5432"] |
18 | 17 | options: >- |
19 | | - --health-cmd pg_isready --health-interval 5s --health-timeout 5s |
20 | | - --health-retries 10 |
| 18 | + --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 |
21 | 19 | env: |
22 | | - TEST_DATABASE_URL: postgres://postgres:memory-test@localhost:5432/postgres |
| 20 | + TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/memory |
23 | 21 | steps: |
24 | | - - uses: actions/checkout@v4 |
25 | | - - uses: oven-sh/setup-bun@v2 |
| 22 | + - uses: actions/checkout@v5 |
| 23 | + - uses: actions/setup-node@v4 |
26 | 24 | with: |
27 | | - bun-version: latest |
| 25 | + node-version: 24 |
| 26 | + - uses: oven-sh/setup-bun@v2 |
28 | 27 | - run: bun install --frozen-lockfile |
29 | | - - run: bun run lint |
30 | | - - run: bun run format:check |
31 | | - - run: bun run typecheck |
32 | | - - run: bun run test |
| 28 | + - run: bun run check |
33 | 29 | - run: bun run test:e2e |
34 | | - node: |
35 | | - runs-on: ubuntu-latest |
36 | | - strategy: |
37 | | - matrix: |
38 | | - node-version: [24] |
39 | | - steps: |
40 | | - - uses: actions/checkout@v4 |
41 | | - - uses: actions/setup-node@v4 |
42 | | - with: |
43 | | - node-version: ${{ matrix.node-version }} |
44 | | - - run: npm install --no-audit --no-fund |
45 | | - - run: npx tsc --noEmit |
46 | | - - run: npm pack --dry-run |
| 30 | + - name: node consumer smoke |
| 31 | + run: | |
| 32 | + set -euo pipefail |
| 33 | + TARBALL="$PWD/$(npm pack --silent)" |
| 34 | + mkdir -p "$RUNNER_TEMP/c" && cd "$RUNNER_TEMP/c" |
| 35 | + npm init -y >/dev/null && npm pkg set type=module >/dev/null |
| 36 | + npm install "$TARBALL" |
| 37 | + node -e 'import("@corbits/memory").then((m) => { for (const n of ["createMemory", "createMemoryRoutes", "loadMemoryConfig", "mountWorkflowMemory", "createMemoryHttpClient"]) if (typeof m[n] !== "function") throw new Error("missing export: " + n); })' |
0 commit comments