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
ci(ts): fix next push trigger and cache reuse (#3971)
Alberto Schiabel64acec65b695
diff --git a/.github/actions/setup-node-pnpm-bun/action.yml b/.github/actions/setup-node-pnpm-bun/action.ymlindex df16e60e7..47f514370 100644--- a/.github/actions/setup-node-pnpm-bun/action.yml+++ b/.github/actions/setup-node-pnpm-bun/action.yml@@ -18,6 +18,13 @@ inputs:description: 'Cache .turbo build outputs'required: falsedefault: 'false'+ cache-save:+ description: >-+ Persist pnpm/turbo caches in the post-job phase. Set to 'false' on runs+ whose caches other branches cannot restore (e.g. pull_request runs) to+ skip the post-job save and avoid evicting default-branch caches.+ required: false+ default: 'true'outputs:node-version:@@ -84,7 +91,7 @@ runs:echo "NODE_VERSION=$(node --version | sed 's/^v//')" >> "$GITHUB_OUTPUT"- name: Cache pnpm store- if: inputs.enable-caching == 'true'+ if: inputs.enable-caching == 'true' && inputs.cache-save == 'true'uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0with:path: ${{ steps.pnpm-store.outputs.STORE_PATH }}@@ -92,13 +99,34 @@ runs:restore-keys: |${{ runner.os }}-node${{ steps.pnpm-store.outputs.NODE_VERSION }}-pnpm-store-+ - name: Restore pnpm store (read-only)+ if: inputs.enable-caching == 'true' && inputs.cache-save != 'true'+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0+ with:+ path: ${{ steps.pnpm-store.outputs.STORE_PATH }}+ key: ${{ runner.os }}-node${{ steps.pnpm-store.outputs.NODE_VERSION }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}+ restore-keys: |+ ${{ runner.os }}-node${{ steps.pnpm-store.outputs.NODE_VERSION }}-pnpm-store-+- name: Cache turbo build outputs- if: inputs.enable-caching == 'true' && inputs.enable-turbo-cache == 'true'+ if: inputs.enable-caching == 'true' && inputs.enable-turbo-cache == 'true' && inputs.cache-save == 'true'uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0with:path: .turbo/cache# Keyed per job: concurrent jobs save different task graphs under the# same commit, and actions/cache is first-writer-wins on exact keys.+ # The per-commit suffix is intentional even though it never exact-hits:+ # the turbo cache accumulates, so every save must use a fresh key and+ # readers match through the restore-keys prefix.+ key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.sha }}+ restore-keys: |+ ${{ runner.os }}-turbo-${{ github.job }}-++ - name: Restore turbo build outputs (read-only)+ if: inputs.enable-caching == 'true' && inputs.enable-turbo-cache == 'true' && inputs.cache-save != 'true'+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0+ with:+ path: .turbo/cachekey: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.sha }}restore-keys: |${{ runner.os }}-turbo-${{ github.job }}-diff --git a/.github/workflows/py.check.yaml b/.github/workflows/py.check.yamlindex 8b834bbf4..d1a0bb7fc 100644--- a/.github/workflows/py.check.yaml+++ b/.github/workflows/py.check.yaml@@ -2,7 +2,7 @@ name: Checkson:push:branches:- - master+ - nextpaths:- 'python/**/*.py'- '.github/actions/setup-python-uv/action.yml'diff --git a/.github/workflows/ts.build.yml b/.github/workflows/ts.build.ymlindex c4b9473c6..2ca8b9123 100644--- a/.github/workflows/ts.build.yml+++ b/.github/workflows/ts.build.yml@@ -2,7 +2,7 @@ name: Build Typescript SDKon:push:- branches: [master]+ branches: [next]paths:- 'ts/**'- '.oxlintrc.json'@@ -53,6 +53,10 @@ jobs:uses: ./.github/actions/setup-node-pnpm-bunwith:enable-turbo-cache: 'true'+ # Only push runs on next save caches: PR-scoped caches are invisible+ # to other branches, so saving them costs post-job time and evicts+ # reusable default-branch caches from the 10 GB repo quota.+ cache-save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}- name: Install Dependenciesrun: pnpm install --frozen-lockfile