Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix test installation file
Rahul Tarak80a3d4492cc7
diff --git a/.github/workflows/test-installation.yml b/.github/workflows/test-installation.ymlindex 3f3d2fb58..35f7877b2 100644--- a/.github/workflows/test-installation.yml+++ b/.github/workflows/test-installation.yml@@ -28,47 +28,47 @@ jobs:include:# Ubuntu x64 versions- os: ubuntu-20.04- name: "Ubuntu 20.04 x64"+ name: 'Ubuntu 20.04 x64'shell: bash- os: ubuntu-22.04- name: "Ubuntu 22.04 x64"+ name: 'Ubuntu 22.04 x64'shell: bash- os: ubuntu-22.04- name: "Ubuntu 22.04 x64 (zsh)"+ name: 'Ubuntu 22.04 x64 (zsh)'shell: zsh- os: ubuntu-latest- name: "Ubuntu Latest x64"+ name: 'Ubuntu Latest x64'shell: bash-+# Ubuntu ARM64 versions (using Depot)- os: depot-ubuntu-24.04-arm- name: "Ubuntu 24.04 ARM64"+ name: 'Ubuntu 24.04 ARM64'shell: bash- os: depot-ubuntu-22.04-arm- name: "Ubuntu 22.04 ARM64"+ name: 'Ubuntu 22.04 ARM64'shell: bash- os: depot-ubuntu-22.04-arm- name: "Ubuntu 22.04 ARM64 (zsh)"+ name: 'Ubuntu 22.04 ARM64 (zsh)'shell: zsh-+# macOS versions- os: macos-12- name: "macOS 12 (Monterey)"+ name: 'macOS 12 (Monterey)'shell: bash- os: macos-13- name: "macOS 13 (Ventura)"+ name: 'macOS 13 (Ventura)'shell: bash- os: macos-13- name: "macOS 13 (zsh)"+ name: 'macOS 13 (zsh)'shell: zsh- os: macos-14- name: "macOS 14 (Sonoma)"+ name: 'macOS 14 (Sonoma)'shell: bash- os: macos-latest- name: "macOS Latest"+ name: 'macOS Latest'shell: bash- os: macos-latest- name: "macOS Latest (zsh)"+ name: 'macOS Latest (zsh)'shell: zshsteps:@@ -107,14 +107,14 @@ jobs:shell: bashrun: |echo "Testing installation with latest version..."-+# Test the install scriptbash install.sh-+# Verify installationsource ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || trueexport PATH="$HOME/.composio/bin:$PATH"-+# Check if binary existsif [[ -f "$HOME/.composio/bin/composio" ]]; thenecho "✅ Binary installed successfully"@@ -123,7 +123,7 @@ jobs:echo "❌ Binary not found"exit 1fi-+# Test binary executionif "$HOME/.composio/bin/composio" --version; thenecho "✅ Binary executes successfully"@@ -137,14 +137,14 @@ jobs:shell: bashrun: |echo "Testing installation with version: ${{ inputs.version }}"-+# Test the install script with specific versionbash install.sh ${{ inputs.version }}-+# Verify installationsource ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || trueexport PATH="$HOME/.composio/bin:$PATH"-+# Check if binary existsif [[ -f "$HOME/.composio/bin/composio" ]]; thenecho "✅ Binary installed successfully"@@ -153,7 +153,7 @@ jobs:echo "❌ Binary not found"exit 1fi-+# Test binary executionif "$HOME/.composio/bin/composio" --version; thenecho "✅ Binary executes successfully"@@ -163,17 +163,37 @@ jobs:fi- name: Test PATH integration- shell: ${{ matrix.shell }}+ shell: bashrun: |- echo "Testing PATH integration..."-+ echo "Testing PATH integration with ${{ matrix.shell }}..."+# Source the appropriate shell configif [[ "${{ matrix.shell }}" == "zsh" ]]; then- source ~/.zshrc+ # Test with zsh config+ if [[ -f ~/.zshrc ]]; then+ source ~/.zshrc+ fielse- source ~/.bashrc+ # Test with bash config+ if [[ -f ~/.bashrc ]]; then+ source ~/.bashrc+ fifi-++ # Test if composio is in PATH+ if command -v composio &> /dev/null; then+ echo "✅ composio found in PATH"+ which composio+ else+ echo "❌ composio not found in PATH"+ echo "PATH: $PATH"+ exit 1+ fi++ # Test basic commands+ composio --version+ composio --help | head -5+# Test if composio is in PATHif command -v composio &> /dev/null; thenecho "✅ composio found in PATH"@@ -183,7 +203,7 @@ jobs:echo "PATH: $PATH"exit 1fi-+# Test basic commandscomposio --versioncomposio --help | head -5@@ -191,7 +211,7 @@ jobs:- name: Test shell config updatesrun: |echo "Checking shell configuration updates..."-+if [[ "${{ matrix.shell }}" == "zsh" ]]; thenif grep -q "COMPOSIO_INSTALL" ~/.zshrc; thenecho "✅ .zshrc updated with COMPOSIO_INSTALL"@@ -226,14 +246,14 @@ jobs:shell: bashrun: |echo "Testing custom install directory..."-+# Clean up previous installationrm -rf ~/.composio-+# Test with custom directoryexport COMPOSIO_INSTALL="/tmp/custom-composio"bash install.sh-+# Verify custom installationif [[ -f "/tmp/custom-composio/bin/composio" ]]; thenecho "✅ Custom directory installation successful"@@ -242,7 +262,7 @@ jobs:echo "❌ Custom directory installation failed"exit 1fi-+# Test executionif "/tmp/custom-composio/bin/composio" --version; thenecho "✅ Custom installation executes successfully"@@ -254,10 +274,10 @@ jobs:- name: Test uninstallationrun: |echo "Testing uninstallation..."-+# Remove binaryrm -rf ~/.composio /tmp/custom-composio-+# Check if binary is goneif [[ ! -f "$HOME/.composio/bin/composio" ]]; thenecho "✅ Binary removed successfully"@@ -270,7 +290,7 @@ jobs:shell: bashrun: |echo "Testing error handling..."-+# Test with invalid versionif bash install.sh v999.999.999 2>&1 | grep -q "Failed"; thenecho "✅ Error handling works for invalid version"@@ -300,7 +320,7 @@ jobs:- name: Test npm installationrun: |echo "Testing npm installation as fallback..."-+# This would normally install from npm registry# For testing, we just verify the command worksif command -v npm &> /dev/null; then@@ -320,16 +340,16 @@ jobs:include:- os: ubuntu-latestarch: x64- expected: "Linux x64"+ expected: 'Linux x64'- os: depot-ubuntu-24.04-armarch: arm64- expected: "Linux ARM64"+ expected: 'Linux ARM64'- os: macos-13arch: x64- expected: "macOS x64"+ expected: 'macOS x64'- os: macos-latestarch: arm64- expected: "macOS ARM64"+ expected: 'macOS ARM64'steps:- name: Checkout@@ -338,10 +358,10 @@ jobs:- name: Test architecture detectionrun: |echo "Testing architecture detection for: ${{ matrix.expected }}"-+platform=$(uname -ms)echo "Detected platform: $platform"-+case $platform in'Darwin x86_64')detected="macOS x64"@@ -360,7 +380,7 @@ jobs:exit 1;;esac-+if [[ "$detected" == "${{ matrix.expected }}" ]]; thenecho "✅ Correctly detected: $detected"else@@ -383,7 +403,7 @@ jobs:- name: Test required toolsrun: |echo "Testing required tools..."-+# Test curlif command -v curl &> /dev/null; thenecho "✅ curl available"@@ -392,7 +412,7 @@ jobs:echo "❌ curl not available"exit 1fi-+# Test unzipif command -v unzip &> /dev/null; thenecho "✅ unzip available"@@ -405,17 +425,17 @@ jobs:- name: Test without prerequisitesrun: |echo "Testing error handling when prerequisites are missing..."-+# Create a version of the script that will fail prerequisite checksed 's/command -v curl/command -v nonexistent-tool/' install.sh > test-install.sh-+if bash test-install.sh 2>&1 | grep -q "required to install"; thenecho "✅ Prerequisites check works"elseecho "❌ Prerequisites check failed"exit 1fi-+rm test-install.shsummary:@@ -429,31 +449,31 @@ jobs:run: |echo "## Installation Test Results" >> $GITHUB_STEP_SUMMARYecho "" >> $GITHUB_STEP_SUMMARY-+if [[ "${{ needs.test-install-script.result }}" == "success" ]]; thenecho "✅ **Install Script Tests**: PASSED" >> $GITHUB_STEP_SUMMARYelseecho "❌ **Install Script Tests**: FAILED" >> $GITHUB_STEP_SUMMARYfi-+if [[ "${{ needs.test-npm-fallback.result }}" == "success" ]]; thenecho "✅ **npm Fallback Tests**: PASSED" >> $GITHUB_STEP_SUMMARYelseecho "❌ **npm Fallback Tests**: FAILED" >> $GITHUB_STEP_SUMMARYfi-+if [[ "${{ needs.test-architecture-detection.result }}" == "success" ]]; thenecho "✅ **Architecture Detection**: PASSED" >> $GITHUB_STEP_SUMMARYelseecho "❌ **Architecture Detection**: FAILED" >> $GITHUB_STEP_SUMMARYfi-+if [[ "${{ needs.test-prerequisites.result }}" == "success" ]]; thenecho "✅ **Prerequisites Check**: PASSED" >> $GITHUB_STEP_SUMMARYelseecho "❌ **Prerequisites Check**: FAILED" >> $GITHUB_STEP_SUMMARYfi-+echo "" >> $GITHUB_STEP_SUMMARYecho "**Test Matrix Coverage:**" >> $GITHUB_STEP_SUMMARYecho "- **Linux x64**: Ubuntu 20.04, 22.04, Latest" >> $GITHUB_STEP_SUMMARY@@ -462,4 +482,4 @@ jobs:echo "- **macOS ARM64**: macOS Latest" >> $GITHUB_STEP_SUMMARYecho "- **Shells**: Bash and Zsh" >> $GITHUB_STEP_SUMMARYecho "- **Node.js**: 18, 20, 22 (npm fallback)" >> $GITHUB_STEP_SUMMARY- echo "- **Total platforms**: 4 architectures across 15+ environments" >> $GITHUB_STEP_SUMMARY\ No newline at end of file+ echo "- **Total platforms**: 4 architectures across 15+ environments" >> $GITHUB_STEP_SUMMARY