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.

ci(cli): validate installer in clean containers

jkomynobd43e8f79e33
diff --git a/.github/workflows/cli.install-e2e.yml b/.github/workflows/cli.install-e2e.yml
new file mode 100644
index 000000000..c1f09eb41
--- /dev/null
+++ b/.github/workflows/cli.install-e2e.yml
@@ -0,0 +1,169 @@
+name: CLI Install E2E
+
+on:
+ schedule:
+ - cron: '0 7 * * *'
+ workflow_dispatch:
+ pull_request:
+ paths:
+ - 'install.sh'
+ - 'install/**'
+ - 'test/install-sh-release-resolution.test.sh'
+ - 'ts/packages/cli/**'
+ - 'ts/packages/cli-local-tools/**'
+ - 'ts/e2e-tests/cli/install/**'
+ - 'ts/e2e-tests/_utils/**'
+ - '.github/actions/setup-node-pnpm-bun/action.yml'
+ - '.github/workflows/cli.install-e2e.yml'
+ - 'package.json'
+ - 'pnpm-lock.yaml'
+ - 'pnpm-workspace.yaml'
+ - 'turbo.jsonc'
+ - 'mise.toml'
+ - 'mise.lock'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: false
+
+permissions:
+ contents: read
+
+jobs:
+ production:
+ name: Production install (${{ matrix.shell }}, ${{ matrix.version }})
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - shell: bash
+ version: latest
+ - shell: zsh
+ version: latest
+ - shell: zsh
+ version: '@composio/[email protected]'
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+
+ - name: Setup Node.js, pnpm, Bun
+ uses: ./.github/actions/setup-node-pnpm-bun
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Test production installer
+ env:
+ COMPOSIO_INSTALL_E2E_MODE: prod
+ COMPOSIO_INSTALL_E2E_SHELL: ${{ matrix.shell }}
+ COMPOSIO_INSTALL_E2E_VERSION: ${{ matrix.version }}
+ run: pnpm test:e2e:install
+
+ - name: Send Slack notification on failure
+ if: failure()
+ uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
+ with:
+ webhook: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
+ webhook-type: incoming-webhook
+ payload: |
+ {
+ "text": "CLI install E2E failed\n*Case:* ${{ matrix.shell }} / ${{ matrix.version }}\n*Repository:* ${{ github.repository }}\n*Run:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Commit:* ${{ github.sha }}"
+ }
+
+ build-local-fixture:
+ name: Build local install fixture
+ if: github.event_name == 'pull_request'
+ runs-on: ubuntu-latest
+ timeout-minutes: 25
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+
+ - name: Setup Node.js, pnpm, Bun
+ uses: ./.github/actions/setup-node-pnpm-bun
+ with:
+ enable-turbo-cache: 'true'
+ cache-save: 'false'
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Typecheck install E2E suite
+ run: pnpm turbo typecheck --filter=@e2e-tests/cli-install
+
+ - name: Test upgrade through an entry-point symlink
+ working-directory: ts/packages/cli
+ run: pnpm vitest run test/src/services/upgrade-binary.test.ts
+
+ - name: Build packages
+ run: pnpm build:packages
+
+ - name: Build and package Linux fixture
+ working-directory: ts/packages/cli
+ env:
+ RELEASE_TAG: '@composio/[email protected]'
+ run: |
+ pnpm build:binary:cross --target bun-linux-x64
+ pnpm build:binary:package
+ pnpm build:binary:checksums
+
+ - name: Verify and stage fixture
+ working-directory: ts/packages/cli
+ run: |
+ set -euo pipefail
+ fixture_dir="$RUNNER_TEMP/cli-install-fixture"
+ mkdir -p "$fixture_dir"
+ cp dist/binaries/composio-linux-x64.zip dist/binaries/checksums.txt "$fixture_dir/"
+ unzip -p "$fixture_dir/composio-linux-x64.zip" composio-linux-x64/release-tag.txt \
+ | grep -Fx '@composio/[email protected]'
+ verify_dir=$(mktemp -d)
+ unzip -q "$fixture_dir/composio-linux-x64.zip" -d "$verify_dir"
+ test "$("$verify_dir/composio-linux-x64/composio" --version)" = 98.0.0
+
+ - name: Upload local fixture
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+ with:
+ name: cli-install-linux-x64
+ path: ${{ runner.temp }}/cli-install-fixture
+ retention-days: 1
+
+ local-install:
+ name: Local install (${{ matrix.shell }})
+ if: github.event_name == 'pull_request'
+ needs: build-local-fixture
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ shell: [zsh, bash]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+
+ - name: Setup Node.js, pnpm, Bun
+ uses: ./.github/actions/setup-node-pnpm-bun
+ with:
+ cache-save: 'false'
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Download local fixture
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
+ with:
+ name: cli-install-linux-x64
+ path: ${{ runner.temp }}/cli-install-fixture
+
+ - name: Test local installer
+ env:
+ COMPOSIO_INSTALL_E2E_MODE: local
+ COMPOSIO_INSTALL_E2E_SHELL: ${{ matrix.shell }}
+ COMPOSIO_INSTALL_E2E_RELEASE_DIR: ${{ runner.temp }}/cli-install-fixture
+ run: pnpm test:e2e:install