Fix prettier formatting
This commit is contained in:
44
test/docker-test/Dockerfile
Normal file
44
test/docker-test/Dockerfile
Normal file
@@ -0,0 +1,44 @@
|
||||
# Simulate GitHub Actions environment
|
||||
FROM node:18
|
||||
|
||||
# Install bun
|
||||
RUN curl -fsSL https://bun.sh/install | bash
|
||||
ENV PATH="/root/.bun/bin:${PATH}"
|
||||
|
||||
# Set up working directory structure like GitHub Actions
|
||||
RUN mkdir -p /home/runner/work/test-repo/test-repo
|
||||
RUN mkdir -p /home/runner/work/_actions/anthropics/claude-code-action/main
|
||||
|
||||
# Copy the action code
|
||||
WORKDIR /home/runner/work/_actions/anthropics/claude-code-action/main
|
||||
COPY . .
|
||||
|
||||
# Install dependencies
|
||||
RUN bun install
|
||||
|
||||
# Set up test repository
|
||||
WORKDIR /home/runner/work/test-repo/test-repo
|
||||
RUN mkdir -p api/api/sampling/stages
|
||||
RUN echo "# Test file" > api/api/sampling/stages/partial_completion_processing.py
|
||||
|
||||
# Set GitHub Actions environment variables
|
||||
ENV GITHUB_WORKSPACE=/home/runner/work/test-repo/test-repo
|
||||
ENV GITHUB_ACTION_PATH=/home/runner/work/_actions/anthropics/claude-code-action/main
|
||||
|
||||
# Create test script
|
||||
RUN cat > /test-mcp.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
echo "=== Testing MCP Server ==="
|
||||
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Files in repo:"
|
||||
find . -name "*.py" | head -5
|
||||
|
||||
# Run the MCP server test
|
||||
cd $GITHUB_ACTION_PATH
|
||||
bun test test/mcp-server-integration.test.ts
|
||||
EOF
|
||||
|
||||
RUN chmod +x /test-mcp.sh
|
||||
|
||||
CMD ["/test-mcp.sh"]
|
||||
16
test/docker-test/docker-compose.yml
Normal file
16
test/docker-test/docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mcp-test:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: test/docker-test/Dockerfile
|
||||
environment:
|
||||
- GITHUB_TOKEN=test-token
|
||||
- REPO_OWNER=anthropics
|
||||
- REPO_NAME=anthropic
|
||||
- BRANCH_NAME=test-branch
|
||||
volumes:
|
||||
# Mount the source code for live testing
|
||||
- ../../src:/home/runner/work/_actions/anthropics/claude-code-action/main/src
|
||||
- ../../test:/home/runner/work/_actions/anthropics/claude-code-action/main/test
|
||||
Reference in New Issue
Block a user