@devries-cameron20 / composio Mirror · read-only / commits / 80a3d4492
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 23:15 UTC

fix test installation file

Rahul Tarak committed Jun 26, 2025 at 01:24 UTC 80a3d4492cc7c141dec01b5a3c61bab4f665bd21
1 file changed +77 -57
.github/workflows/test-installation.yml
+77 -57
@@ -28,47 +28,47 @@ jobs:
28 include:
29 # Ubuntu x64 versions
30 - os: ubuntu-20.04
31 - name: "Ubuntu 20.04 x64"
31 + name: 'Ubuntu 20.04 x64'
32 shell: bash
33 - os: ubuntu-22.04
34 - name: "Ubuntu 22.04 x64"
34 + name: 'Ubuntu 22.04 x64'
35 shell: bash
36 - os: ubuntu-22.04
37 - name: "Ubuntu 22.04 x64 (zsh)"
37 + name: 'Ubuntu 22.04 x64 (zsh)'
38 shell: zsh
39 - os: ubuntu-latest
40 - name: "Ubuntu Latest x64"
40 + name: 'Ubuntu Latest x64'
41 shell: bash
42 -
42 +
43 # Ubuntu ARM64 versions (using Depot)
44 - os: depot-ubuntu-24.04-arm
45 - name: "Ubuntu 24.04 ARM64"
45 + name: 'Ubuntu 24.04 ARM64'
46 shell: bash
47 - os: depot-ubuntu-22.04-arm
48 - name: "Ubuntu 22.04 ARM64"
48 + name: 'Ubuntu 22.04 ARM64'
49 shell: bash
50 - os: depot-ubuntu-22.04-arm
51 - name: "Ubuntu 22.04 ARM64 (zsh)"
51 + name: 'Ubuntu 22.04 ARM64 (zsh)'
52 shell: zsh
53 -
53 +
54 # macOS versions
55 - os: macos-12
56 - name: "macOS 12 (Monterey)"
56 + name: 'macOS 12 (Monterey)'
57 shell: bash
58 - os: macos-13
59 - name: "macOS 13 (Ventura)"
59 + name: 'macOS 13 (Ventura)'
60 shell: bash
61 - os: macos-13
62 - name: "macOS 13 (zsh)"
62 + name: 'macOS 13 (zsh)'
63 shell: zsh
64 - os: macos-14
65 - name: "macOS 14 (Sonoma)"
65 + name: 'macOS 14 (Sonoma)'
66 shell: bash
67 - os: macos-latest
68 - name: "macOS Latest"
68 + name: 'macOS Latest'
69 shell: bash
70 - os: macos-latest
71 - name: "macOS Latest (zsh)"
71 + name: 'macOS Latest (zsh)'
72 shell: zsh
73
74 steps:
@@ -107,14 +107,14 @@ jobs:
107 shell: bash
108 run: |
109 echo "Testing installation with latest version..."
110 -
110 +
111 # Test the install script
112 bash install.sh
113 -
113 +
114 # Verify installation
115 source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
116 export PATH="$HOME/.composio/bin:$PATH"
117 -
117 +
118 # Check if binary exists
119 if [[ -f "$HOME/.composio/bin/composio" ]]; then
120 echo "✅ Binary installed successfully"
@@ -123,7 +123,7 @@ jobs:
123 echo "❌ Binary not found"
124 exit 1
125 fi
126 -
126 +
127 # Test binary execution
128 if "$HOME/.composio/bin/composio" --version; then
129 echo "✅ Binary executes successfully"
@@ -137,14 +137,14 @@ jobs:
137 shell: bash
138 run: |
139 echo "Testing installation with version: ${{ inputs.version }}"
140 -
140 +
141 # Test the install script with specific version
142 bash install.sh ${{ inputs.version }}
143 -
143 +
144 # Verify installation
145 source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
146 export PATH="$HOME/.composio/bin:$PATH"
147 -
147 +
148 # Check if binary exists
149 if [[ -f "$HOME/.composio/bin/composio" ]]; then
150 echo "✅ Binary installed successfully"
@@ -153,7 +153,7 @@ jobs:
153 echo "❌ Binary not found"
154 exit 1
155 fi
156 -
156 +
157 # Test binary execution
158 if "$HOME/.composio/bin/composio" --version; then
159 echo "✅ Binary executes successfully"
@@ -163,17 +163,37 @@ jobs:
163 fi
164
165 - name: Test PATH integration
166 - shell: ${{ matrix.shell }}
166 + shell: bash
167 run: |
168 - echo "Testing PATH integration..."
169 -
168 + echo "Testing PATH integration with ${{ matrix.shell }}..."
169 +
170 # Source the appropriate shell config
171 if [[ "${{ matrix.shell }}" == "zsh" ]]; then
172 - source ~/.zshrc
172 + # Test with zsh config
173 + if [[ -f ~/.zshrc ]]; then
174 + source ~/.zshrc
175 + fi
176 else
174 - source ~/.bashrc
177 + # Test with bash config
178 + if [[ -f ~/.bashrc ]]; then
179 + source ~/.bashrc
180 + fi
181 fi
176 -
182 +
183 + # Test if composio is in PATH
184 + if command -v composio &> /dev/null; then
185 + echo "✅ composio found in PATH"
186 + which composio
187 + else
188 + echo "❌ composio not found in PATH"
189 + echo "PATH: $PATH"
190 + exit 1
191 + fi
192 +
193 + # Test basic commands
194 + composio --version
195 + composio --help | head -5
196 +
197 # Test if composio is in PATH
198 if command -v composio &> /dev/null; then
199 echo "✅ composio found in PATH"
@@ -183,7 +203,7 @@ jobs:
203 echo "PATH: $PATH"
204 exit 1
205 fi
186 -
206 +
207 # Test basic commands
208 composio --version
209 composio --help | head -5
@@ -191,7 +211,7 @@ jobs:
211 - name: Test shell config updates
212 run: |
213 echo "Checking shell configuration updates..."
194 -
214 +
215 if [[ "${{ matrix.shell }}" == "zsh" ]]; then
216 if grep -q "COMPOSIO_INSTALL" ~/.zshrc; then
217 echo "✅ .zshrc updated with COMPOSIO_INSTALL"
@@ -226,14 +246,14 @@ jobs:
246 shell: bash
247 run: |
248 echo "Testing custom install directory..."
229 -
249 +
250 # Clean up previous installation
251 rm -rf ~/.composio
232 -
252 +
253 # Test with custom directory
254 export COMPOSIO_INSTALL="/tmp/custom-composio"
255 bash install.sh
236 -
256 +
257 # Verify custom installation
258 if [[ -f "/tmp/custom-composio/bin/composio" ]]; then
259 echo "✅ Custom directory installation successful"
@@ -242,7 +262,7 @@ jobs:
262 echo "❌ Custom directory installation failed"
263 exit 1
264 fi
245 -
265 +
266 # Test execution
267 if "/tmp/custom-composio/bin/composio" --version; then
268 echo "✅ Custom installation executes successfully"
@@ -254,10 +274,10 @@ jobs:
274 - name: Test uninstallation
275 run: |
276 echo "Testing uninstallation..."
257 -
277 +
278 # Remove binary
279 rm -rf ~/.composio /tmp/custom-composio
260 -
280 +
281 # Check if binary is gone
282 if [[ ! -f "$HOME/.composio/bin/composio" ]]; then
283 echo "✅ Binary removed successfully"
@@ -270,7 +290,7 @@ jobs:
290 shell: bash
291 run: |
292 echo "Testing error handling..."
273 -
293 +
294 # Test with invalid version
295 if bash install.sh v999.999.999 2>&1 | grep -q "Failed"; then
296 echo "✅ Error handling works for invalid version"
@@ -300,7 +320,7 @@ jobs:
320 - name: Test npm installation
321 run: |
322 echo "Testing npm installation as fallback..."
303 -
323 +
324 # This would normally install from npm registry
325 # For testing, we just verify the command works
326 if command -v npm &> /dev/null; then
@@ -320,16 +340,16 @@ jobs:
340 include:
341 - os: ubuntu-latest
342 arch: x64
323 - expected: "Linux x64"
343 + expected: 'Linux x64'
344 - os: depot-ubuntu-24.04-arm
345 arch: arm64
326 - expected: "Linux ARM64"
346 + expected: 'Linux ARM64'
347 - os: macos-13
348 arch: x64
329 - expected: "macOS x64"
349 + expected: 'macOS x64'
350 - os: macos-latest
351 arch: arm64
332 - expected: "macOS ARM64"
352 + expected: 'macOS ARM64'
353
354 steps:
355 - name: Checkout
@@ -338,10 +358,10 @@ jobs:
358 - name: Test architecture detection
359 run: |
360 echo "Testing architecture detection for: ${{ matrix.expected }}"
341 -
361 +
362 platform=$(uname -ms)
363 echo "Detected platform: $platform"
344 -
364 +
365 case $platform in
366 'Darwin x86_64')
367 detected="macOS x64"
@@ -360,7 +380,7 @@ jobs:
380 exit 1
381 ;;
382 esac
363 -
383 +
384 if [[ "$detected" == "${{ matrix.expected }}" ]]; then
385 echo "✅ Correctly detected: $detected"
386 else
@@ -383,7 +403,7 @@ jobs:
403 - name: Test required tools
404 run: |
405 echo "Testing required tools..."
386 -
406 +
407 # Test curl
408 if command -v curl &> /dev/null; then
409 echo "✅ curl available"
@@ -392,7 +412,7 @@ jobs:
412 echo "❌ curl not available"
413 exit 1
414 fi
395 -
415 +
416 # Test unzip
417 if command -v unzip &> /dev/null; then
418 echo "✅ unzip available"
@@ -405,17 +425,17 @@ jobs:
425 - name: Test without prerequisites
426 run: |
427 echo "Testing error handling when prerequisites are missing..."
408 -
428 +
429 # Create a version of the script that will fail prerequisite check
430 sed 's/command -v curl/command -v nonexistent-tool/' install.sh > test-install.sh
411 -
431 +
432 if bash test-install.sh 2>&1 | grep -q "required to install"; then
433 echo "✅ Prerequisites check works"
434 else
435 echo "❌ Prerequisites check failed"
436 exit 1
437 fi
418 -
438 +
439 rm test-install.sh
440
441 summary:
@@ -429,31 +449,31 @@ jobs:
449 run: |
450 echo "## Installation Test Results" >> $GITHUB_STEP_SUMMARY
451 echo "" >> $GITHUB_STEP_SUMMARY
432 -
452 +
453 if [[ "${{ needs.test-install-script.result }}" == "success" ]]; then
454 echo "✅ **Install Script Tests**: PASSED" >> $GITHUB_STEP_SUMMARY
455 else
456 echo "❌ **Install Script Tests**: FAILED" >> $GITHUB_STEP_SUMMARY
457 fi
438 -
458 +
459 if [[ "${{ needs.test-npm-fallback.result }}" == "success" ]]; then
460 echo "✅ **npm Fallback Tests**: PASSED" >> $GITHUB_STEP_SUMMARY
461 else
462 echo "❌ **npm Fallback Tests**: FAILED" >> $GITHUB_STEP_SUMMARY
463 fi
444 -
464 +
465 if [[ "${{ needs.test-architecture-detection.result }}" == "success" ]]; then
466 echo "✅ **Architecture Detection**: PASSED" >> $GITHUB_STEP_SUMMARY
467 else
468 echo "❌ **Architecture Detection**: FAILED" >> $GITHUB_STEP_SUMMARY
469 fi
450 -
470 +
471 if [[ "${{ needs.test-prerequisites.result }}" == "success" ]]; then
472 echo "✅ **Prerequisites Check**: PASSED" >> $GITHUB_STEP_SUMMARY
473 else
474 echo "❌ **Prerequisites Check**: FAILED" >> $GITHUB_STEP_SUMMARY
475 fi
456 -
476 +
477 echo "" >> $GITHUB_STEP_SUMMARY
478 echo "**Test Matrix Coverage:**" >> $GITHUB_STEP_SUMMARY
479 echo "- **Linux x64**: Ubuntu 20.04, 22.04, Latest" >> $GITHUB_STEP_SUMMARY
@@ -462,4 +482,4 @@ jobs:
482 echo "- **macOS ARM64**: macOS Latest" >> $GITHUB_STEP_SUMMARY
483 echo "- **Shells**: Bash and Zsh" >> $GITHUB_STEP_SUMMARY
484 echo "- **Node.js**: 18, 20, 22 (npm fallback)" >> $GITHUB_STEP_SUMMARY
465 - echo "- **Total platforms**: 4 architectures across 15+ environments" >> $GITHUB_STEP_SUMMARY
\ No newline at end of file
485 + echo "- **Total platforms**: 4 architectures across 15+ environments" >> $GITHUB_STEP_SUMMARY