Skip to content

Commit 052b444

Browse files
chore(internal/ci): setup breaking change detection
1 parent 5a1325c commit 052b444

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7ef7a457c3bf05364e66e48c9ca34f31bfef1f6c9b7c15b1812346105e0abb16.yml
33
openapi_spec_hash: a2b1f5d8fbb62175c93b0ebea9f10063
4-
config_hash: 76afa3236f36854a8705f1281b1990b8
4+
config_hash: 4870312b04f48fd717ea4151053e7fb9

scripts/detect-breaking-changes

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
cd "$(dirname "$0")/.."
6+
7+
echo "==> Detecting breaking changes"
8+
9+
TEST_PATHS=(
10+
tests/api-resources/completions.test.ts
11+
tests/api-resources/chat/chat.test.ts
12+
tests/api-resources/chat/completions/completions.test.ts
13+
tests/api-resources/chat/completions/messages.test.ts
14+
tests/api-resources/embeddings.test.ts
15+
tests/api-resources/files.test.ts
16+
tests/api-resources/images.test.ts
17+
tests/api-resources/audio/audio.test.ts
18+
tests/api-resources/audio/transcriptions.test.ts
19+
tests/api-resources/audio/translations.test.ts
20+
tests/api-resources/audio/speech.test.ts
21+
tests/api-resources/moderations.test.ts
22+
tests/api-resources/models.test.ts
23+
tests/api-resources/fine-tuning/fine-tuning.test.ts
24+
tests/api-resources/fine-tuning/jobs/jobs.test.ts
25+
tests/api-resources/fine-tuning/jobs/checkpoints.test.ts
26+
tests/api-resources/fine-tuning/checkpoints/checkpoints.test.ts
27+
tests/api-resources/fine-tuning/checkpoints/permissions.test.ts
28+
tests/api-resources/fine-tuning/alpha/alpha.test.ts
29+
tests/api-resources/fine-tuning/alpha/graders.test.ts
30+
tests/api-resources/vector-stores/vector-stores.test.ts
31+
tests/api-resources/vector-stores/files.test.ts
32+
tests/api-resources/vector-stores/file-batches.test.ts
33+
tests/api-resources/beta/beta.test.ts
34+
tests/api-resources/beta/realtime/realtime.test.ts
35+
tests/api-resources/beta/realtime/sessions.test.ts
36+
tests/api-resources/beta/realtime/transcription-sessions.test.ts
37+
tests/api-resources/beta/assistants.test.ts
38+
tests/api-resources/beta/threads/threads.test.ts
39+
tests/api-resources/beta/threads/runs/runs.test.ts
40+
tests/api-resources/beta/threads/runs/steps.test.ts
41+
tests/api-resources/beta/threads/messages.test.ts
42+
tests/api-resources/batches.test.ts
43+
tests/api-resources/uploads/uploads.test.ts
44+
tests/api-resources/uploads/parts.test.ts
45+
tests/api-resources/responses/responses.test.ts
46+
tests/api-resources/responses/input-items.test.ts
47+
tests/api-resources/evals/evals.test.ts
48+
tests/api-resources/evals/runs/runs.test.ts
49+
tests/api-resources/evals/runs/output-items.test.ts
50+
tests/api-resources/containers/containers.test.ts
51+
tests/api-resources/containers/files/files.test.ts
52+
tests/api-resources/containers/files/content.test.ts
53+
tests/index.test.ts
54+
)
55+
56+
for PATHSPEC in "${TEST_PATHS[@]}"; do
57+
# Try to check out previous versions of the test files
58+
# with the current SDK.
59+
git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true
60+
done
61+
62+
# Instead of running the tests, use the linter to check if an
63+
# older test is no longer compatible with the latest SDK.
64+
./scripts/lint

0 commit comments

Comments
 (0)