added LISTEN tuning config and docs, versioning, deps #1
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
| on: | |
| push: | |
| branches: [master] | |
| tags-ignore: ['**'] | |
| paths-ignore: | |
| - 'packages/dashboard/**' | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: | |
| - 'packages/dashboard/**' | |
| name: CI | |
| jobs: | |
| # Runs the full suite against Postgres in two modes via one matrix: | |
| # - standard: npm run cover (with coverage, uploaded to Coveralls as the only flag) | |
| # - distributed: npm run test:distributed (DISTRIBUTED=true) | |
| # distributedDatabaseMode is a pure runtime fetch-strategy toggle, so every test (existing and new) | |
| # is automatically exercised against the distributed code paths in the distributed leg - fast and | |
| # reliable, without CockroachDB's slow DDL. The distributed leg is behavioral only: its line | |
| # coverage is already produced by the standard leg, where distributedDatabaseTest/perJobResultsTest | |
| # pin __test__distributed per-instance. Its value is catching features that regress under the | |
| # distributed fetch path (retry/policies/flows/dead-letter/...), which coverage % can't see. | |
| # fail-fast is off so one mode's failure doesn't mask the other's result. | |
| test: | |
| runs-on: ubuntu-latest | |
| container: node:24 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - mode: standard | |
| command: npm run cover | |
| - mode: distributed | |
| command: npm run test:distributed | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| - name: Install | |
| run: npm install | |
| - name: Test (${{ matrix.mode }}) | |
| run: ${{ matrix.command }} | |
| env: | |
| POSTGRES_HOST: postgres | |
| # Only the standard leg produces coverage; the distributed leg uploads nothing. | |
| - name: Coveralls | |
| if: ${{ matrix.mode == 'standard' }} | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| flag-name: standard | |
| parallel: true | |
| # Runs the full suite against embedded PGlite (in-process WASM PostgreSQL). No service container is | |
| # needed — the database runs inside the test process. Connection-model-specific tests (custom pg | |
| # connections, pool internals, multi-master, distributed mode) are skipped via itPglite/describePglite. | |
| test-pglite: | |
| runs-on: ubuntu-latest | |
| container: node:24 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| - name: Install | |
| run: npm install | |
| - name: Test (pglite) | |
| run: npm run test:pglite | |
| # Fast feedback on every push/PR: the distributed-mode invariants that the rest of the | |
| # suite can't express, run against a real CockroachDB cluster. | |
| test-cockroachdb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| - name: Start CockroachDB cluster | |
| run: | | |
| docker compose -f docker-compose.cockroach.yaml up -d | |
| # `up --wait` can't be used here: the one-shot init/setup containers exit by design, which | |
| # newer compose reports as a failed service. Block on the setup container instead - it | |
| # creates the pgboss database once the cluster is initialized. | |
| docker wait pgboss-cockroach-cockroachdb-setup-1 || true | |
| docker compose -f docker-compose.cockroach.yaml exec -T cockroachdb-1 cockroach sql --insecure -e "SHOW DATABASES" | grep -q pgboss | |
| - name: Install | |
| run: npm ci | |
| - name: Test distributed database mode | |
| run: npm run test:cockroachdb | |
| coverage: | |
| needs: [test] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true | |
| carryforward: "standard" |