ci: run the postgres tests in ci #64

Sammanfogat
supernaut sammanfogade 2 incheckningar från ci/db-tests in i main 2026-10-01 19:48:29 +00:00
Ägare

What

  • A "Start Postgres" step runs postgres:17 with podman run -p 5432:5432 (production runs 17.x), and the job sets TEST_DATABASE_URL to localhost, so the DB-backed money-path tests run on every PR. A step, not services:: the ci runner is a host executor and never starts service containers (first run failed with getaddrinfo ENOTFOUND postgres).
  • src/testing/db.ts throws at import when CI is set and TEST_DATABASE_URL is not. A missing database now fails CI instead of skipping the suites silently.

Verification

  • Local, podman postgres:17, CI=true with TEST_DATABASE_URL: 16/16 files, 243/243 tests pass (31 DB-gated).
  • CI=true without it: the two DB test files fail at import.
  • The same step run locally, then CI=true: 16/16 files, 243/243 tests.
  • The first CI run proved the guard: with no database it failed instead of skipping.

Closes #61

## What - A "Start Postgres" step runs `postgres:17` with `podman run -p 5432:5432` (production runs 17.x), and the job sets `TEST_DATABASE_URL` to localhost, so the DB-backed money-path tests run on every PR. A step, not `services:`: the `ci` runner is a host executor and never starts service containers (first run failed with `getaddrinfo ENOTFOUND postgres`). - `src/testing/db.ts` throws at import when `CI` is set and `TEST_DATABASE_URL` is not. A missing database now fails CI instead of skipping the suites silently. ## Verification - Local, podman `postgres:17`, `CI=true` with `TEST_DATABASE_URL`: 16/16 files, 243/243 tests pass (31 DB-gated). - `CI=true` without it: the two DB test files fail at import. - The same step run locally, then `CI=true`: 16/16 files, 243/243 tests. - The first CI run proved the guard: with no database it failed instead of skipping. Closes #61
supernaut lade till 1 incheckning 2026-10-01 18:20:35 +00:00
ci: run the postgres tests in ci
En del kontroller misslyckades
ci / ci (pull_request) Failing after 1m0s
2ada990dea
Add a postgres 17 service container and set TEST_DATABASE_URL. With CI set, the test helper throws when the URL is missing, so the 28 DB tests cannot skip silently.

Closes #61
supernaut lade till 1 incheckning 2026-10-01 19:19:09 +00:00
ci: start postgres with podman instead of a service container
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m0s
4ccd43993a
The ci runner is a host executor, so services: never started and the tests failed with getaddrinfo ENOTFOUND postgres.

Refs #61
supernaut sammanfogade incheckning fd105b4ec1 till main 2026-10-01 19:48:29 +00:00
supernaut tog bort grenen ci/db-tests 2026-10-01 19:48:29 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-01 19:48:31 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-01 21:26:09 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-01 21:45:03 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-02 17:57:02 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-02 17:57:02 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-payment!64
Ingen beskrivning angiven.