# Evolution Test Container
# Used for testing pipeline-judge fitness scoring with precise measurements

FROM oven/bun:1 AS base

WORKDIR /app

# Install TypeScript and testing tools
RUN bun add -g typescript @types/node

# Copy project files
COPY . /app/

# Install dependencies
RUN bun install

# Create logs directory
RUN mkdir -p .kilo/logs

# Health check
HEALTHCHECK --interval=30s --timeout=10s \
  CMD bun test --reporter=json || exit 1

# Default command - run tests with precise timing
CMD ["bun", "test", "--reporter=json"]