test: e2e tests #37
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Debug Docker Setup | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| jobs: | |
| debug-docker: | |
| runs-on: macos-13 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check system info | |
| run: | | |
| echo "=== System Information ===" | |
| uname -a | |
| sw_vers | |
| echo "=== Available commands ===" | |
| which brew | |
| which python3 | |
| which docker || echo "Docker not found" | |
| - name: Install Docker CLI only | |
| run: | | |
| echo "=== Installing Docker CLI (no GUI) ===" | |
| # Install just the Docker CLI, not the full Desktop app | |
| brew install docker | |
| echo "Docker CLI installed" | |
| - name: Set up Docker | |
| uses: docker/setup-docker-action@v4 | |
| id: docker-official | |
| continue-on-error: true | |
| with: | |
| install: false # We already installed it | |
| daemon-config: | | |
| { | |
| "experimental": false, | |
| "debug": true, | |
| "log-driver": "json-file", | |
| "log-opts": { | |
| "max-size": "10m", | |
| "max-file": "3" | |
| } | |
| } | |
| # - name: Setup Docker Colima (Fallback) | |
| # uses: douglascamata/setup-docker-macos-action@v1-alpha | |
| # id: docker-colima | |
| # continue-on-error: true | |
| - name: Check Docker setup results | |
| run: | | |
| echo "=== Docker Setup Results ===" | |
| echo "Official Docker action result: ${{ steps.docker-official.outcome }}" | |
| # echo "Colima action result: ${{ steps.docker-colima.outcome }}" | |
| - name: Wait for Docker to start | |
| run: | | |
| echo "=== Waiting for Docker to start ===" | |
| # Use a for loop instead of timeout (macOS doesn't have timeout command) | |
| for i in {1..18}; do | |
| if docker info >/dev/null 2>&1; then | |
| echo "Docker is ready!" | |
| break | |
| fi | |
| echo "Waiting for Docker... ($(date)) (attempt $i/18)" | |
| sleep 10 | |
| done | |
| # Final check | |
| if ! docker info >/dev/null 2>&1; then | |
| echo "Docker failed to start after 3 minutes" | |
| exit 1 | |
| fi | |
| - name: Test Docker functionality | |
| run: | | |
| echo "=== Testing Docker ===" | |
| docker --version | |
| docker info | |
| docker ps | |
| echo "=== Testing Docker Compose V2 ===" | |
| docker compose version || echo "docker compose not found" | |
| - name: Install Docker Compose V2 | |
| run: | | |
| echo "=== Installing Docker Compose V2 ===" | |
| # Install Docker Compose V2 plugin via Homebrew | |
| brew install docker-compose | |
| echo "Docker Compose V2 installed" | |
| docker compose version | |
| - name: Test simple Docker command | |
| run: | | |
| echo "=== Testing simple Docker command ===" | |
| docker run --rm hello-world | |
| echo "Docker test successful!" | |
| - name: Test Docker Compose V2 | |
| run: | | |
| echo "=== Testing Docker Compose V2 ===" | |
| mkdir -p test-compose | |
| cat > test-compose/docker-compose.yml << 'EOF' | |
| version: '3.8' | |
| services: | |
| test: | |
| image: hello-world | |
| command: echo "Docker Compose V2 test successful!" | |
| EOF | |
| cd test-compose | |
| docker compose up | |
| echo "Docker Compose V2 test successful!" |