@@ -40,83 +40,26 @@ jobs:
4040 with :
4141 python_versions_json : ' ["3.10"]'
4242
43- determine-test-suites :
44- name : Determine test suites
45- runs-on : ubuntu-latest
46- outputs :
47- rest_sync_suites : ${{ steps.determine.outputs.rest_sync_suites }}
48- rest_asyncio_suites : ${{ steps.determine.outputs.rest_asyncio_suites }}
49- grpc_sync_suites : ${{ steps.determine.outputs.grpc_sync_suites }}
50- admin_suites : ${{ steps.determine.outputs.admin_suites }}
51- steps :
52- - uses : actions/checkout@v4
53- with :
54- fetch-depth : 0 # Fetch full history for git diff
55- - name : Determine test suites
56- id : determine
57- run : |
58- run_all="${{ github.event.inputs.run_all_tests == 'true' }}"
59- if [ "${{ github.event_name }}" = "pull_request" ]; then
60- base_ref="${{ github.event.pull_request.base.ref }}"
61- else
62- base_ref="main"
63- fi
64-
65- if [ "$run_all" = "true" ]; then
66- echo "Running all tests (manual override)"
67- python3 .github/scripts/determine-test-suites.py --run-all --output-format json > test_suites.json
68- else
69- echo "Determining test suites based on changed files (base: $base_ref)"
70- if ! python3 .github/scripts/determine-test-suites.py --base-ref "$base_ref" --output-format json > test_suites.json 2>&1; then
71- echo "Script failed, falling back to all tests"
72- python3 .github/scripts/determine-test-suites.py --run-all --output-format json > test_suites.json
73- fi
74- fi
75-
76- # Validate JSON was created
77- if [ ! -f test_suites.json ] || ! jq empty test_suites.json 2>/dev/null; then
78- echo "Error: Failed to generate valid test_suites.json, falling back to all tests"
79- python3 .github/scripts/determine-test-suites.py --run-all --output-format json > test_suites.json
80- fi
81-
82- # Extract each job type's suites and set as outputs
83- rest_sync=$(jq -c '.rest_sync' test_suites.json)
84- rest_asyncio=$(jq -c '.rest_asyncio' test_suites.json)
85- grpc_sync=$(jq -c '.grpc_sync' test_suites.json)
86- admin=$(jq -c '.admin' test_suites.json)
87-
88- echo "rest_sync_suites=$rest_sync" >> $GITHUB_OUTPUT
89- echo "rest_asyncio_suites=$rest_asyncio" >> $GITHUB_OUTPUT
90- echo "grpc_sync_suites=$grpc_sync" >> $GITHUB_OUTPUT
91- echo "admin_suites=$admin" >> $GITHUB_OUTPUT
92-
93- echo "Selected test suites:"
94- echo "REST sync: $rest_sync"
95- echo "REST asyncio: $rest_asyncio"
96- echo "gRPC sync: $grpc_sync"
97- echo "Admin: $admin"
98-
9943 create-project :
10044 uses : ' ./.github/workflows/project-setup.yaml'
10145 secrets : inherit
10246 needs :
10347 - unit-tests
10448
10549 integration-tests :
106- if : always() && (needs.unit-tests.result == 'success' && needs.create-project.result == 'success' && needs.determine-test-suites.result == 'success' )
50+ if : always() && (needs.unit-tests.result == 'success' && needs.create-project.result == 'success')
10751 uses : ' ./.github/workflows/testing-integration.yaml'
10852 secrets : inherit
10953 needs :
11054 - unit-tests
11155 - create-project
112- - determine-test-suites
11356 with :
11457 encrypted_project_api_key : ${{ needs.create-project.outputs.encrypted_project_api_key }}
11558 python_versions_json : ' ["3.10"]'
116- rest_sync_suites_json : ${{ needs.determine-test-suites.outputs.rest_sync_suites || '' }}
117- rest_asyncio_suites_json : ${{ needs.determine-test-suites.outputs.rest_asyncio_suites || '' }}
118- grpc_sync_suites_json : ${{ needs.determine-test-suites.outputs.grpc_sync_suites || '' }}
119- admin_suites_json : ${{ needs.determine-test-suites.outputs.admin_suites || '' }}
59+ rest_sync_suites_json : ' '
60+ rest_asyncio_suites_json : ' '
61+ grpc_sync_suites_json : ' '
62+ admin_suites_json : ' '
12063
12164 cleanup-project :
12265 if : ${{ always() }}
0 commit comments