[docs] Add screenshots to pg-boss dashboard #923
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
| # Actions are pinned to full commit SHAs; see .github/dependabot.yml for why and how they are updated. | |
| 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| 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@8d6379e14d29928660c4ba802d8e85393440b329 # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| - name: Install | |
| run: npm install | |
| - name: Test (pglite) | |
| run: npm run test:pglite | |
| # docs/index.md is generated from README.md by scripts/sync-readme.js, so a README edit | |
| # that skips the regenerate step silently leaves the docs home page stale. The check needs | |
| # no dependencies (the script uses only node builtins) and no database, so it runs as its | |
| # own job for fast, clearly-named feedback instead of riding along in a test leg. | |
| docs-readme-sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 24 | |
| - name: Check docs/index.md is in sync with README.md | |
| run: npm run docs:readme -- --check | |
| # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| 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@8d6379e14d29928660c4ba802d8e85393440b329 # v2 | |
| with: | |
| parallel-finished: true | |
| carryforward: "standard" |