Skip to content

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

fix test installation file

Rahul Tarak80a3d4492cc7
diff --git a/.github/workflows/test-installation.yml b/.github/workflows/test-installation.yml
index 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: zsh
steps:
@@ -107,14 +107,14 @@ jobs:
shell: bash
run: |
echo "Testing installation with latest version..."
-
+
# Test the install script
bash install.sh
-
+
# Verify installation
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
export PATH="$HOME/.composio/bin:$PATH"
-
+
# Check if binary exists
if [[ -f "$HOME/.composio/bin/composio" ]]; then
echo "✅ Binary installed successfully"
@@ -123,7 +123,7 @@ jobs:
echo "❌ Binary not found"
exit 1
fi
-
+
# Test binary execution
if "$HOME/.composio/bin/composio" --version; then
echo "✅ Binary executes successfully"
@@ -137,14 +137,14 @@ jobs:
shell: bash
run: |
echo "Testing installation with version: ${{ inputs.version }}"
-
+
# Test the install script with specific version
bash install.sh ${{ inputs.version }}
-
+
# Verify installation
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
export PATH="$HOME/.composio/bin:$PATH"
-
+
# Check if binary exists
if [[ -f "$HOME/.composio/bin/composio" ]]; then
echo "✅ Binary installed successfully"
@@ -153,7 +153,7 @@ jobs:
echo "❌ Binary not found"
exit 1
fi
-
+
# Test binary execution
if "$HOME/.composio/bin/composio" --version; then
echo "✅ Binary executes successfully"
@@ -163,17 +163,37 @@ jobs:
fi
- name: Test PATH integration
- shell: ${{ matrix.shell }}
+ shell: bash
run: |
- echo "Testing PATH integration..."
-
+ echo "Testing PATH integration with ${{ matrix.shell }}..."
+
# Source the appropriate shell config
if [[ "${{ matrix.shell }}" == "zsh" ]]; then
- source ~/.zshrc
+ # Test with zsh config
+ if [[ -f ~/.zshrc ]]; then
+ source ~/.zshrc
+ fi
else
- source ~/.bashrc
+ # Test with bash config
+ if [[ -f ~/.bashrc ]]; then
+ source ~/.bashrc
+ fi
fi
-
+
+ # 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 PATH
if command -v composio &> /dev/null; then
echo "✅ composio found in PATH"
@@ -183,7 +203,7 @@ jobs:
echo "PATH: $PATH"
exit 1
fi
-
+
# Test basic commands
composio --version
composio --help | head -5
@@ -191,7 +211,7 @@ jobs:
- name: Test shell config updates
run: |
echo "Checking shell configuration updates..."
-
+
if [[ "${{ matrix.shell }}" == "zsh" ]]; then
if grep -q "COMPOSIO_INSTALL" ~/.zshrc; then
echo "✅ .zshrc updated with COMPOSIO_INSTALL"
@@ -226,14 +246,14 @@ jobs:
shell: bash
run: |
echo "Testing custom install directory..."
-
+
# Clean up previous installation
rm -rf ~/.composio
-
+
# Test with custom directory
export COMPOSIO_INSTALL="/tmp/custom-composio"
bash install.sh
-
+
# Verify custom installation
if [[ -f "/tmp/custom-composio/bin/composio" ]]; then
echo "✅ Custom directory installation successful"
@@ -242,7 +262,7 @@ jobs:
echo "❌ Custom directory installation failed"
exit 1
fi
-
+
# Test execution
if "/tmp/custom-composio/bin/composio" --version; then
echo "✅ Custom installation executes successfully"
@@ -254,10 +274,10 @@ jobs:
- name: Test uninstallation
run: |
echo "Testing uninstallation..."
-
+
# Remove binary
rm -rf ~/.composio /tmp/custom-composio
-
+
# Check if binary is gone
if [[ ! -f "$HOME/.composio/bin/composio" ]]; then
echo "✅ Binary removed successfully"
@@ -270,7 +290,7 @@ jobs:
shell: bash
run: |
echo "Testing error handling..."
-
+
# Test with invalid version
if bash install.sh v999.999.999 2>&1 | grep -q "Failed"; then
echo "✅ Error handling works for invalid version"
@@ -300,7 +320,7 @@ jobs:
- name: Test npm installation
run: |
echo "Testing npm installation as fallback..."
-
+
# This would normally install from npm registry
# For testing, we just verify the command works
if command -v npm &> /dev/null; then
@@ -320,16 +340,16 @@ jobs:
include:
- os: ubuntu-latest
arch: x64
- expected: "Linux x64"
+ expected: 'Linux x64'
- os: depot-ubuntu-24.04-arm
arch: arm64
- expected: "Linux ARM64"
+ expected: 'Linux ARM64'
- os: macos-13
arch: x64
- expected: "macOS x64"
+ expected: 'macOS x64'
- os: macos-latest
arch: arm64
- expected: "macOS ARM64"
+ expected: 'macOS ARM64'
steps:
- name: Checkout
@@ -338,10 +358,10 @@ jobs:
- name: Test architecture detection
run: |
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 }}" ]]; then
echo "✅ Correctly detected: $detected"
else
@@ -383,7 +403,7 @@ jobs:
- name: Test required tools
run: |
echo "Testing required tools..."
-
+
# Test curl
if command -v curl &> /dev/null; then
echo "✅ curl available"
@@ -392,7 +412,7 @@ jobs:
echo "❌ curl not available"
exit 1
fi
-
+
# Test unzip
if command -v unzip &> /dev/null; then
echo "✅ unzip available"
@@ -405,17 +425,17 @@ jobs:
- name: Test without prerequisites
run: |
echo "Testing error handling when prerequisites are missing..."
-
+
# Create a version of the script that will fail prerequisite check
sed '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"; then
echo "✅ Prerequisites check works"
else
echo "❌ Prerequisites check failed"
exit 1
fi
-
+
rm test-install.sh
summary:
@@ -429,31 +449,31 @@ jobs:
run: |
echo "## Installation Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
-
+
if [[ "${{ needs.test-install-script.result }}" == "success" ]]; then
echo "✅ **Install Script Tests**: PASSED" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Install Script Tests**: FAILED" >> $GITHUB_STEP_SUMMARY
fi
-
+
if [[ "${{ needs.test-npm-fallback.result }}" == "success" ]]; then
echo "✅ **npm Fallback Tests**: PASSED" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **npm Fallback Tests**: FAILED" >> $GITHUB_STEP_SUMMARY
fi
-
+
if [[ "${{ needs.test-architecture-detection.result }}" == "success" ]]; then
echo "✅ **Architecture Detection**: PASSED" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Architecture Detection**: FAILED" >> $GITHUB_STEP_SUMMARY
fi
-
+
if [[ "${{ needs.test-prerequisites.result }}" == "success" ]]; then
echo "✅ **Prerequisites Check**: PASSED" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Prerequisites Check**: FAILED" >> $GITHUB_STEP_SUMMARY
fi
-
+
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Test Matrix Coverage:**" >> $GITHUB_STEP_SUMMARY
echo "- **Linux x64**: Ubuntu 20.04, 22.04, Latest" >> $GITHUB_STEP_SUMMARY
@@ -462,4 +482,4 @@ jobs:
echo "- **macOS ARM64**: macOS Latest" >> $GITHUB_STEP_SUMMARY
echo "- **Shells**: Bash and Zsh" >> $GITHUB_STEP_SUMMARY
echo "- **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