Skip to content

Remove Docker from CI integration tests #164

@jakebromberg

Description

@jakebromberg

Replace Docker image builds and container orchestration in the CI Integration-Tests job with GitHub Actions service containers (PostgreSQL) and native Node.js processes (auth + backend).

Problem

The Integration-Tests job averages ~7 minutes, but only ~7 seconds is actual test execution. The rest is Docker overhead: building 3 images, starting 4 containers via Docker Compose, and cleaning up. The ECR caching strategy never hits for auth/backend because shared/ changes on nearly every PR.

Solution

  • PostgreSQL: Move from Docker Compose to a GHA services: block (zero build cost)
  • db-init: Run node dev_env/init-db.mjs directly on the runner
  • Auth + Backend: Start as background node processes after npm run build
  • Remove: Buildx setup, ECR login, image pull/build logic, merge-base SHA tracking, Docker Compose up/down

Estimated savings

Metric Before After
Integration-Tests job ~7 min ~2 min
Docker image builds 3 images (~4 min) 0
Container orchestration ~2.5 min ~15s

What stays the same

  • detect-changes logic for whether to run integration tests
  • npm ci and node_modules caching
  • Jest test execution (npm run ci:test)
  • Local CI scripts (ci-env.sh, ci-test.sh) -- Docker-based path unchanged for local dev

Supersedes

See Proposal 3 for full analysis and data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions