Docker E2E Tests #24
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: Docker E2E Tests | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 2 * * 0' # Weekly on Sunday at 2 AM | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| docker-e2e-tests: | |
| name: "Docker E2E Tests" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| test-phase: | |
| - name: "without-claude-cli" | |
| install-claude: false | |
| description: "Test extension when Claude CLI not installed" | |
| - name: "with-claude-cli" | |
| install-claude: true | |
| description: "Test extension when Claude CLI is installed" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build test Docker image | |
| run: | | |
| docker build -f docker/Dockerfile.test -t claude-runner-test:${{ matrix.test-phase.name }} . | |
| - name: Run tests in Docker container | |
| run: | | |
| docker run --rm \ | |
| -e TEST_PHASE="${{ matrix.test-phase.name }}" \ | |
| -e INSTALL_CLAUDE="${{ matrix.test-phase.install-claude }}" \ | |
| --name claude-test-${{ matrix.test-phase.name }} \ | |
| claude-runner-test:${{ matrix.test-phase.name }} | |
| - name: Extract test artifacts | |
| if: always() | |
| run: | | |
| mkdir -p test-results/${{ matrix.test-phase.name }} | |
| docker create --name extract claude-runner-test:${{ matrix.test-phase.name }} | |
| docker cp extract:/workspace/dist/ test-results/${{ matrix.test-phase.name }}/ | |
| docker rm extract | |
| - name: Upload test artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docker-test-${{ matrix.test-phase.name }} | |
| path: test-results/ | |
| retention-days: 7 | |
| docker-test-summary: | |
| name: "Docker Test Summary" | |
| runs-on: ubuntu-latest | |
| needs: docker-e2e-tests | |
| if: always() | |
| steps: | |
| - name: Generate Docker Test Report | |
| run: | | |
| echo "Docker E2E Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "=======================" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Test Phases:" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Without Claude CLI:" >> $GITHUB_STEP_SUMMARY | |
| echo "- Tests extension detection of missing Claude CLI" >> $GITHUB_STEP_SUMMARY | |
| echo "- Verifies graceful handling of missing dependencies" >> $GITHUB_STEP_SUMMARY | |
| echo "- Runs core unit and main window tests" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "With Claude CLI:" >> $GITHUB_STEP_SUMMARY | |
| echo "- Installs Claude CLI via npm" >> $GITHUB_STEP_SUMMARY | |
| echo "- Tests full integration capabilities" >> $GITHUB_STEP_SUMMARY | |
| echo "- Runs comprehensive E2E test suite" >> $GITHUB_STEP_SUMMARY | |
| echo "- Validates CLI detection and functionality" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Environment:" >> $GITHUB_STEP_SUMMARY | |
| echo "- Docker containers for isolation" >> $GITHUB_STEP_SUMMARY | |
| echo "- Xvfb for headless VS Code testing" >> $GITHUB_STEP_SUMMARY | |
| echo "- VSIX package building and installation" >> $GITHUB_STEP_SUMMARY |