|
7 | 7 | branches: [main]
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - changes: |
11 |
| - name: Determine suites to run |
12 |
| - runs-on: ubuntu-latest |
13 |
| - outputs: |
14 |
| - suites: ${{ steps.set-suites.outputs.suites }} |
15 |
| - should_run: ${{ steps.set-suites.outputs.should_run }} |
16 |
| - matrix: ${{ steps.set-suites.outputs.matrix }} |
17 |
| - steps: |
18 |
| - - name: Checkout code |
19 |
| - uses: actions/checkout@v4 |
20 |
| - with: |
21 |
| - fetch-depth: 0 |
22 |
| - |
23 |
| - - name: Detect changes |
24 |
| - id: filter |
25 |
| - uses: dorny/paths-filter@v3 |
26 |
| - with: |
27 |
| - filters: | |
28 |
| - # Core changes that run ALL suites |
29 |
| - core_changes: |
30 |
| - - 'typescript-sdk/packages/**' |
31 |
| - - 'typescript-sdk/package.json' |
32 |
| - - 'typescript-sdk/pnpm-workspace.yaml' |
33 |
| - - 'typescript-sdk/tsconfig.json' |
34 |
| - - 'typescript-sdk/turbo.json' |
35 |
| - - 'python-sdk/**' |
36 |
| - - 'typescript-sdk/apps/dojo/e2e/**' |
37 |
| - - '!typescript-sdk/apps/dojo/e2e/tests/**' |
38 |
| - - 'typescript-sdk/apps/dojo/scripts/**' |
39 |
| - - '.github/workflows/dojo-e2e.yml' |
40 |
| -
|
41 |
| - # Individual suite changes (source OR tests) |
42 |
| - agno_changes: |
43 |
| - - 'typescript-sdk/integrations/agno/**' |
44 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/agnoTests/**' |
45 |
| - crew_ai_changes: |
46 |
| - - 'typescript-sdk/integrations/crewai/**' |
47 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/crewAITests/**' |
48 |
| - langgraph_changes: |
49 |
| - - 'typescript-sdk/integrations/langgraph/**' |
50 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/langgraphTests/**' |
51 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/langgraphFastAPITests/**' |
52 |
| - llama_index_changes: |
53 |
| - - 'typescript-sdk/integrations/llamaindex/**' |
54 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/llamaIndexTests/**' |
55 |
| - mastra_changes: |
56 |
| - - 'typescript-sdk/integrations/mastra/**' |
57 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/mastraTests/**' |
58 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/mastraAgentLocalTests/**' |
59 |
| - middleware_starter_changes: |
60 |
| - - 'typescript-sdk/integrations/middleware-starter/**' |
61 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/middlewareStarterTests/**' |
62 |
| - pydantic_ai_changes: |
63 |
| - - 'typescript-sdk/integrations/pydantic-ai/**' |
64 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/pydanticAITests/**' |
65 |
| - server_starter_changes: |
66 |
| - - 'typescript-sdk/integrations/server-starter/**' |
67 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/serverStarterTests/**' |
68 |
| - server_starter_all_changes: |
69 |
| - - 'typescript-sdk/integrations/server-starter-all-features/**' |
70 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/serverStarterAllFeaturesTests/**' |
71 |
| - vercel_ai_sdk_changes: |
72 |
| - - 'typescript-sdk/integrations/vercel-ai-sdk/**' |
73 |
| - - 'typescript-sdk/apps/dojo/e2e/tests/vercelAISdkTests/**' |
74 |
| -
|
75 |
| - - name: Set suites output |
76 |
| - id: set-suites |
77 |
| - run: | |
78 |
| - set -euo pipefail |
79 |
| - |
80 |
| - # Define all possible matrix configurations |
81 |
| - ALL_MATRIX='[ |
82 |
| - {"suite":"agno","test_path":"tests/agnoTests","services":["dojo","agno"],"wait_on":"http://localhost:9999,tcp:localhost:8002"}, |
83 |
| - {"suite":"crew-ai","test_path":"tests/crewAITests","services":["dojo","crew-ai"],"wait_on":"http://localhost:9999,tcp:localhost:8003"}, |
84 |
| - {"suite":"langgraph","test_path":"tests/langgraphTests","services":["dojo","langgraph-platform-python","langgraph-platform-typescript"],"wait_on":"http://localhost:9999,tcp:localhost:8005,tcp:localhost:8006"}, |
85 |
| - {"suite":"langgraph-fastapi","test_path":"tests/langgraphFastAPITests","services":["dojo","langgraph-fastapi"],"wait_on":"http://localhost:9999,tcp:localhost:8004"}, |
86 |
| - {"suite":"llama-index","test_path":"tests/llamaIndexTests","services":["dojo","llama-index"],"wait_on":"http://localhost:9999,tcp:localhost:8007"}, |
87 |
| - {"suite":"mastra","test_path":"tests/mastraTests","services":["dojo","mastra"],"wait_on":"http://localhost:9999,tcp:localhost:8008"}, |
88 |
| - {"suite":"mastra-agent-local","test_path":"tests/mastraAgentLocalTests","services":["dojo"],"wait_on":"http://localhost:9999"}, |
89 |
| - {"suite":"middleware-starter","test_path":"tests/middlewareStarterTests","services":["dojo"],"wait_on":"http://localhost:9999"}, |
90 |
| - {"suite":"pydantic-ai","test_path":"tests/pydanticAITests","services":["dojo","pydantic-ai"],"wait_on":"http://localhost:9999,tcp:localhost:8009"}, |
91 |
| - {"suite":"server-starter","test_path":"tests/serverStarterTests","services":["dojo","server-starter"],"wait_on":"http://localhost:9999,tcp:localhost:8000"}, |
92 |
| - {"suite":"server-starter-all","test_path":"tests/serverStarterAllFeaturesTests","services":["dojo","server-starter-all"],"wait_on":"http://localhost:9999,tcp:localhost:8001"}, |
93 |
| - {"suite":"vercel-ai-sdk","test_path":"tests/vercelAISdkTests","services":["dojo"],"wait_on":"http://localhost:9999"} |
94 |
| - ]' |
95 |
| - |
96 |
| - # If core changes, run all suites |
97 |
| - if [[ "${{ steps.filter.outputs.core_changes }}" == "true" ]]; then |
98 |
| - SUITES="agno,crew-ai,langgraph,langgraph-fastapi,llama-index,mastra,mastra-agent-local,middleware-starter,pydantic-ai,server-starter,server-starter-all,vercel-ai-sdk" |
99 |
| - else |
100 |
| - # Build list of changed suites |
101 |
| - SUITES="" |
102 |
| - [[ "${{ steps.filter.outputs.agno_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}agno" |
103 |
| - [[ "${{ steps.filter.outputs.crew_ai_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}crew-ai" |
104 |
| - [[ "${{ steps.filter.outputs.langgraph_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}langgraph,langgraph-fastapi" |
105 |
| - [[ "${{ steps.filter.outputs.llama_index_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}llama-index" |
106 |
| - [[ "${{ steps.filter.outputs.mastra_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}mastra,mastra-agent-local" |
107 |
| - [[ "${{ steps.filter.outputs.middleware_starter_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}middleware-starter" |
108 |
| - [[ "${{ steps.filter.outputs.pydantic_ai_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}pydantic-ai" |
109 |
| - [[ "${{ steps.filter.outputs.server_starter_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}server-starter" |
110 |
| - [[ "${{ steps.filter.outputs.server_starter_all_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}server-starter-all" |
111 |
| - [[ "${{ steps.filter.outputs.vercel_ai_sdk_changes }}" == "true" ]] && SUITES="${SUITES:+$SUITES,}vercel-ai-sdk" |
112 |
| - fi |
113 |
| - |
114 |
| - echo "suites=${SUITES}" >> "$GITHUB_OUTPUT" |
115 |
| - |
116 |
| - # Generate dynamic matrix based on changed suites |
117 |
| - if [[ -n "${SUITES}" ]]; then |
118 |
| - echo "should_run=true" >> "$GITHUB_OUTPUT" |
119 |
| - |
120 |
| - # Filter matrix to only include changed suites |
121 |
| - FILTERED_MATRIX=$(echo "$ALL_MATRIX" | jq -c --arg suites "$SUITES" ' |
122 |
| - [.[] | select(.suite as $suite | ($suites | split(",") | index($suite)))] |
123 |
| - ') |
124 |
| - echo "matrix=${FILTERED_MATRIX}" >> "$GITHUB_OUTPUT" |
125 |
| - else |
126 |
| - echo "should_run=false" >> "$GITHUB_OUTPUT" |
127 |
| - echo "matrix=[]" >> "$GITHUB_OUTPUT" |
128 |
| - fi |
129 | 10 | e2e:
|
130 |
| - needs: changes |
131 |
| - if: ${{ needs.changes.outputs.should_run == 'true' }} |
132 | 11 | name: ${{ matrix.suite }}
|
133 | 12 | runs-on: depot-ubuntu-24.04
|
134 | 13 | strategy:
|
135 | 14 | fail-fast: false
|
136 | 15 | matrix:
|
137 |
| - include: ${{ fromJSON(needs.changes.outputs.matrix) }} |
| 16 | + include: |
| 17 | + - suite: agno |
| 18 | + test_path: tests/agnoTests |
| 19 | + services: ["dojo","agno"] |
| 20 | + wait_on: http://localhost:9999,tcp:localhost:8002 |
| 21 | + - suite: crew-ai |
| 22 | + test_path: tests/crewAITests |
| 23 | + services: ["dojo","crew-ai"] |
| 24 | + wait_on: http://localhost:9999,tcp:localhost:8003 |
| 25 | + - suite: langgraph |
| 26 | + test_path: tests/langgraphTests |
| 27 | + services: ["dojo","langgraph-platform-python","langgraph-platform-typescript"] |
| 28 | + wait_on: http://localhost:9999,tcp:localhost:8005,tcp:localhost:8006 |
| 29 | + - suite: langgraph-fastapi |
| 30 | + test_path: tests/langgraphFastAPITests |
| 31 | + services: ["dojo","langgraph-fastapi"] |
| 32 | + wait_on: http://localhost:9999,tcp:localhost:8004 |
| 33 | + - suite: llama-index |
| 34 | + test_path: tests/llamaIndexTests |
| 35 | + services: ["dojo","llama-index"] |
| 36 | + wait_on: http://localhost:9999,tcp:localhost:8007 |
| 37 | + - suite: mastra |
| 38 | + test_path: tests/mastraTests |
| 39 | + services: ["dojo","mastra"] |
| 40 | + wait_on: http://localhost:9999,tcp:localhost:8008 |
| 41 | + - suite: mastra-agent-local |
| 42 | + test_path: tests/mastraAgentLocalTests |
| 43 | + services: ["dojo"] |
| 44 | + wait_on: http://localhost:9999 |
| 45 | + - suite: middleware-starter |
| 46 | + test_path: tests/middlewareStarterTests |
| 47 | + services: ["dojo"] |
| 48 | + wait_on: http://localhost:9999 |
| 49 | + - suite: pydantic-ai |
| 50 | + test_path: tests/pydanticAITests |
| 51 | + services: ["dojo","pydantic-ai"] |
| 52 | + wait_on: http://localhost:9999,tcp:localhost:8009 |
| 53 | + - suite: server-starter |
| 54 | + test_path: tests/serverStarterTests |
| 55 | + services: ["dojo","server-starter"] |
| 56 | + wait_on: http://localhost:9999,tcp:localhost:8000 |
| 57 | + - suite: server-starter-all |
| 58 | + test_path: tests/serverStarterAllFeaturesTests |
| 59 | + services: ["dojo","server-starter-all"] |
| 60 | + wait_on: http://localhost:9999,tcp:localhost:8001 |
| 61 | + - suite: vercel-ai-sdk |
| 62 | + test_path: tests/vercelAISdkTests |
| 63 | + services: ["dojo"] |
| 64 | + wait_on: http://localhost:9999 |
138 | 65 |
|
139 | 66 | steps:
|
140 | 67 | - name: Checkout code
|
|
0 commit comments