|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | + |
| 4 | +name: CI Orchestrator |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [main, master] |
| 9 | + pull_request: |
| 10 | + branches: [main, master] |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +jobs: |
| 16 | + # Detect which folders have changes |
| 17 | + detect-changes: |
| 18 | + name: Detect Changes |
| 19 | + runs-on: ubuntu-latest |
| 20 | + outputs: |
| 21 | + dotnet-agentframework: ${{ steps.changes.outputs.dotnet-agentframework }} |
| 22 | + dotnet-semantickernel: ${{ steps.changes.outputs.dotnet-semantickernel }} |
| 23 | + nodejs-claude: ${{ steps.changes.outputs.nodejs-claude }} |
| 24 | + nodejs-langchain: ${{ steps.changes.outputs.nodejs-langchain }} |
| 25 | + nodejs-openai: ${{ steps.changes.outputs.nodejs-openai }} |
| 26 | + nodejs-vercelsdk: ${{ steps.changes.outputs.nodejs-vercelsdk }} |
| 27 | + python-agentframework: ${{ steps.changes.outputs.python-agentframework }} |
| 28 | + python-googleadk: ${{ steps.changes.outputs.python-googleadk }} |
| 29 | + python-openai: ${{ steps.changes.outputs.python-openai }} |
| 30 | + python-claude: ${{ steps.changes.outputs.python-claude }} |
| 31 | + steps: |
| 32 | + - name: Checkout repository |
| 33 | + uses: actions/checkout@v4 |
| 34 | + |
| 35 | + - name: Check for changes |
| 36 | + uses: dorny/paths-filter@v3 |
| 37 | + id: changes |
| 38 | + with: |
| 39 | + filters: | |
| 40 | + dotnet-agentframework: |
| 41 | + - 'dotnet/agent-framework/**' |
| 42 | + dotnet-semantickernel: |
| 43 | + - 'dotnet/semantic-kernel/**' |
| 44 | + nodejs-claude: |
| 45 | + - 'nodejs/claude/**' |
| 46 | + nodejs-langchain: |
| 47 | + - 'nodejs/langchain/**' |
| 48 | + nodejs-openai: |
| 49 | + - 'nodejs/openai/**' |
| 50 | + nodejs-vercelsdk: |
| 51 | + - 'nodejs/vercel-sdk/**' |
| 52 | + python-agentframework: |
| 53 | + - 'python/agent-framework/**' |
| 54 | + python-googleadk: |
| 55 | + - 'python/google-adk/**' |
| 56 | + python-openai: |
| 57 | + - 'python/openai/**' |
| 58 | + python-claude: |
| 59 | + - 'python/claude/**' |
| 60 | +
|
| 61 | + # .NET Jobs - Call existing workflows |
| 62 | + dotnet-agentframework: |
| 63 | + name: .NET Agent Framework |
| 64 | + needs: detect-changes |
| 65 | + if: needs.detect-changes.outputs.dotnet-agentframework == 'true' |
| 66 | + uses: ./.github/workflows/ci-dotnet-agentframework-sampleagent.yml |
| 67 | + |
| 68 | + dotnet-semantickernel: |
| 69 | + name: .NET Semantic Kernel |
| 70 | + needs: detect-changes |
| 71 | + if: needs.detect-changes.outputs.dotnet-semantickernel == 'true' |
| 72 | + uses: ./.github/workflows/ci-dotnet-semantickernel-sampleagent.yml |
| 73 | + |
| 74 | + # Node.js Jobs - Call existing workflows |
| 75 | + nodejs-claude: |
| 76 | + name: Node.js Claude |
| 77 | + needs: detect-changes |
| 78 | + if: needs.detect-changes.outputs.nodejs-claude == 'true' |
| 79 | + uses: ./.github/workflows/ci-nodejs-claude-sampleagent.yml |
| 80 | + |
| 81 | + nodejs-langchain: |
| 82 | + name: Node.js LangChain |
| 83 | + needs: detect-changes |
| 84 | + if: needs.detect-changes.outputs.nodejs-langchain == 'true' |
| 85 | + uses: ./.github/workflows/ci-nodejs-langchain-sampleagent.yml |
| 86 | + |
| 87 | + nodejs-openai: |
| 88 | + name: Node.js OpenAI |
| 89 | + needs: detect-changes |
| 90 | + if: needs.detect-changes.outputs.nodejs-openai == 'true' |
| 91 | + uses: ./.github/workflows/ci-nodejs-openai-sampleagent.yml |
| 92 | + |
| 93 | + nodejs-vercelsdk: |
| 94 | + name: Node.js Vercel SDK |
| 95 | + needs: detect-changes |
| 96 | + if: needs.detect-changes.outputs.nodejs-vercelsdk == 'true' |
| 97 | + uses: ./.github/workflows/ci-nodejs-vercelsdk-sampleagent.yml |
| 98 | + |
| 99 | + # Python Jobs - Call existing workflows |
| 100 | + python-agentframework: |
| 101 | + name: Python Agent Framework |
| 102 | + needs: detect-changes |
| 103 | + if: needs.detect-changes.outputs.python-agentframework == 'true' |
| 104 | + uses: ./.github/workflows/ci-python-agentframework-sampleagent.yml |
| 105 | + |
| 106 | + python-googleadk: |
| 107 | + name: Python Google ADK |
| 108 | + needs: detect-changes |
| 109 | + if: needs.detect-changes.outputs.python-googleadk == 'true' |
| 110 | + uses: ./.github/workflows/ci-python-googleadk-sampleagent.yml |
| 111 | + |
| 112 | + python-openai: |
| 113 | + name: Python OpenAI |
| 114 | + needs: detect-changes |
| 115 | + if: needs.detect-changes.outputs.python-openai == 'true' |
| 116 | + uses: ./.github/workflows/ci-python-openai-sampleagent.yml |
| 117 | + |
| 118 | + python-claude: |
| 119 | + name: Python Claude |
| 120 | + needs: detect-changes |
| 121 | + if: needs.detect-changes.outputs.python-claude == 'true' |
| 122 | + uses: ./.github/workflows/python-claude-sample.yml |
| 123 | + |
| 124 | + # Final status check - ALWAYS runs and reports success |
| 125 | + # This is the ONLY check you need to mark as "Required" in branch protection |
| 126 | + ci-status: |
| 127 | + name: CI Status |
| 128 | + runs-on: ubuntu-latest |
| 129 | + needs: |
| 130 | + - detect-changes |
| 131 | + - dotnet-agentframework |
| 132 | + - dotnet-semantickernel |
| 133 | + - nodejs-claude |
| 134 | + - nodejs-langchain |
| 135 | + - nodejs-openai |
| 136 | + - nodejs-vercelsdk |
| 137 | + - python-agentframework |
| 138 | + - python-googleadk |
| 139 | + - python-openai |
| 140 | + - python-claude |
| 141 | + if: always() |
| 142 | + steps: |
| 143 | + - name: Check CI Status |
| 144 | + run: | |
| 145 | + echo "Checking CI job results..." |
| 146 | + |
| 147 | + # Get all job results (including detect-changes; skipped jobs are fine, failed jobs are not) |
| 148 | + results="${{ needs.detect-changes.result }} ${{ needs.dotnet-agentframework.result }} ${{ needs.dotnet-semantickernel.result }} ${{ needs.nodejs-claude.result }} ${{ needs.nodejs-langchain.result }} ${{ needs.nodejs-openai.result }} ${{ needs.nodejs-vercelsdk.result }} ${{ needs.python-agentframework.result }} ${{ needs.python-googleadk.result }} ${{ needs.python-openai.result }} ${{ needs.python-claude.result }}" |
| 149 | + |
| 150 | + echo "Job results: $results" |
| 151 | + |
| 152 | + # Check if any job failed or was cancelled |
| 153 | + if echo "$results" | grep -qE "failure|cancelled"; then |
| 154 | + echo "❌ One or more CI jobs failed or were cancelled" |
| 155 | + exit 1 |
| 156 | + fi |
| 157 | + |
| 158 | + echo "✅ All CI jobs passed (or were skipped because no relevant changes)" |
0 commit comments