Skip to content

Commit 45880db

Browse files
committed
Revise CI configs
1 parent 294cf3b commit 45880db

File tree

4 files changed

+37
-384
lines changed

4 files changed

+37
-384
lines changed

.github/actions/run-integration-test/action.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ inputs:
1919
description: 'Whether to use gRPC or REST'
2020
required: false
2121
default: 'false'
22-
22+
PINECONE_CLIENT_ID:
23+
description: 'The client ID to use for admin tests'
24+
required: false
25+
PINECONE_CLIENT_SECRET:
26+
description: 'The client secret to use for admin tests'
27+
required: false
28+
durations_file:
29+
description: 'Metadata file used to calculate splits'
30+
required: false
31+
total_num_split_groups:
32+
description: 'Number of split groups'
33+
required: true
34+
split_group_to_run:
35+
description: 'The split group to run in this build'
36+
required: true
2337
runs:
2438
using: 'composite'
2539
steps:
@@ -33,9 +47,19 @@ runs:
3347
- name: Run tests
3448
id: run-tests
3549
shell: bash
36-
run: poetry run pytest tests/integration/${{ inputs.test_suite }} --retries 2 --retry-delay 35 -s -vv --log-cli-level=DEBUG --durations=20
50+
run: |
51+
poetry run pytest ${{ inputs.test_suite }} \
52+
--retries 2 \
53+
--retry-delay 35 \
54+
--log-cli-level=DEBUG \
55+
--durations-path=${{ inputs.durations_file }} \
56+
--splits=${{ inputs.total_num_split_groups }} \
57+
--group=${{ inputs.split_group_to_run }} \
58+
-s -vv
3759
env:
3860
PINECONE_API_KEY: ${{ steps.decrypt-api-key.outputs.decrypted_secret }}
3961
PINECONE_ADDITIONAL_HEADERS: ${{ inputs.PINECONE_ADDITIONAL_HEADERS }}
62+
PINECONE_CLIENT_ID: ${{ inputs.client_id }}
63+
PINECONE_CLIENT_SECRET: ${{ inputs.client_secret }}
4064
USE_GRPC: ${{ inputs.use_grpc }}
4165
SKIP_WEIRD: 'true'

.github/scripts/determine-test-suites.py

Lines changed: 0 additions & 231 deletions
This file was deleted.

.github/workflows/on-pr.yaml

Lines changed: 5 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)