Skip to content

test: CI smoke test — Docker image builds and starts healthy #133

@icebear0828

Description

@icebear0828

Goal

Add a GitHub Actions workflow that verifies the Docker image builds and the container starts healthy.

Acceptance criteria

  • New workflow file: .github/workflows/docker-smoke-test.yml
  • Triggers on push to master and on pull_request
  • Steps:
    1. docker build -t codex-proxy-test .
    2. Run container on default port 8080, wait for healthcheck (up to 30s), curl /health returns 200
    3. Cleanup, then test custom port 8090 by mounting a modified config/default.yaml (use sed to change port: 8080port: 8090)
    4. Verify /health returns 200 on 8090
  • Runner: ubuntu-latest

Context

  • Dockerfile is at repo root
  • Healthcheck script: docker-healthcheck.sh (reads port from config/default.yaml)
  • Health endpoint: GET /health
  • Port is configured in YAML config, NOT via environment variable

Constraints — read before writing code

  • Package manager: npm — do NOT introduce pnpm, yarn, or any lock file other than package-lock.json
  • Branch name: master — this repo's default branch is master, not main
  • Do NOT modify .gitignoretests/ is intentionally gitignored
  • Do NOT modify existing dependencies — no version bumps, no downgrades, no moving deps between dependencies/devDependencies
  • Do NOT add new dependencies unless absolutely necessary for this workflow (a pure shell/docker workflow should need none)
  • TypeScript: no any — if you write TS, use concrete types, unknown, or generics
  • This is a standalone workflow — do NOT combine with unit tests or other smoke tests. Keep it focused on Docker only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions