@devries-cameron20 / composio Mirror · read-only
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 21, 03:37 UTC

next
yml 70 lines 2.42 KB
Raw
1 name: Examples Nightly (staging)
2
3 # Executes the provider examples against the STAGING backend with real
4 # credentials. Non-blocking by design: it runs on a schedule (and on demand),
5 # never as a required PR check, so staging/LLM flakiness cannot gate merges.
6 on:
7 schedule:
8 - cron: '0 6 * * *' # 06:00 UTC nightly
9 workflow_dispatch:
10
11 concurrency:
12 group: ${{ github.workflow }}
13 cancel-in-progress: false
14
15 permissions:
16 contents: read
17
18 env:
19 # Staging is not a secret; the API keys are.
20 COMPOSIO_BASE_URL: https://staging-backend.composio.dev
21 COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
22 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
23
24 jobs:
25 examples-staging:
26 name: ${{ matrix.provider }} examples against staging
27 runs-on: ubuntu-latest
28 timeout-minutes: 20
29 strategy:
30 fail-fast: false
31 matrix:
32 provider: [mastra, openai]
33
34 steps:
35 - name: Checkout Code
36 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37
38 - name: Setup Node.js, pnpm, Bun
39 uses: ./.github/actions/setup-node-pnpm-bun
40 with:
41 enable-turbo-cache: 'true'
42
43 - name: Install Dependencies
44 run: pnpm install --frozen-lockfile
45
46 - name: Build SDK packages
47 run: pnpm run build:packages
48
49 # Both secrets must be present for scheduled and manually dispatched
50 # validation. Otherwise smoke can self-skip and the LLM steps can no-op,
51 # leaving the whole regression net green while testing nothing.
52 - name: Require staging credentials
53 if: ${{ env.COMPOSIO_API_KEY == '' || env.OPENAI_API_KEY == '' }}
54 run: |
55 echo "::error::COMPOSIO_API_KEY and OPENAI_API_KEY are required for examples validation."
56 exit 1
57
58 # Deterministic regression net — needs only COMPOSIO_API_KEY, no LLM.
59 # Self-skips when the secret is absent (e.g. fork-triggered dispatch).
60 - name: ${{ matrix.provider }} smoke (wrapping + tool-router)
61 run: pnpm --filter ${{ matrix.provider }}-example --fail-if-no-match run smoke
62
63 # Full agent run — only when an LLM key is configured.
64 - name: ${{ matrix.provider }} direct-tools example
65 if: ${{ env.OPENAI_API_KEY != '' }}
66 run: bun ts/examples/${{ matrix.provider }}/src/index.ts
67
68 - name: ${{ matrix.provider }} tool-router example
69 if: ${{ env.OPENAI_API_KEY != '' }}
70 run: bun ts/examples/${{ matrix.provider }}/src/tool-router.ts