-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (79 loc) · 3.31 KB
/
Copy pathdocker-e2e.yml
File metadata and controls
90 lines (79 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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