openai/openai-node

Public

mirrored from https://github.com/openai/openai-nodeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f606e8b43d0e3d5a3ad31cf7dab1bded0bac4d37

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

scripts/detect-breaking-changes

78lines · modecode

1#!/usr/bin/env bash
2
3set -e
4
5cd "$(dirname "$0")/.."
6
7echo "==> Detecting breaking changes"
8
9TEST_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/chatkit/chatkit.test.ts
38 tests/api-resources/beta/chatkit/sessions.test.ts
39 tests/api-resources/beta/chatkit/threads.test.ts
40 tests/api-resources/beta/assistants.test.ts
41 tests/api-resources/beta/threads/threads.test.ts
42 tests/api-resources/beta/threads/runs/runs.test.ts
43 tests/api-resources/beta/threads/runs/steps.test.ts
44 tests/api-resources/beta/threads/messages.test.ts
45 tests/api-resources/batches.test.ts
46 tests/api-resources/uploads/uploads.test.ts
47 tests/api-resources/uploads/parts.test.ts
48 tests/api-resources/responses/responses.test.ts
49 tests/api-resources/responses/input-items.test.ts
50 tests/api-resources/responses/input-tokens.test.ts
51 tests/api-resources/realtime/realtime.test.ts
52 tests/api-resources/realtime/client-secrets.test.ts
53 tests/api-resources/realtime/calls.test.ts
54 tests/api-resources/conversations/conversations.test.ts
55 tests/api-resources/conversations/items.test.ts
56 tests/api-resources/evals/evals.test.ts
57 tests/api-resources/evals/runs/runs.test.ts
58 tests/api-resources/evals/runs/output-items.test.ts
59 tests/api-resources/containers/containers.test.ts
60 tests/api-resources/containers/files/files.test.ts
61 tests/api-resources/containers/files/content.test.ts
62 tests/api-resources/skills/skills.test.ts
63 tests/api-resources/skills/content.test.ts
64 tests/api-resources/skills/versions/versions.test.ts
65 tests/api-resources/skills/versions/content.test.ts
66 tests/api-resources/videos.test.ts
67 tests/index.test.ts
68)
69
70for PATHSPEC in "${TEST_PATHS[@]}"; do
71 # Try to check out previous versions of the test files
72 # with the current SDK.
73 git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true
74done
75
76# Instead of running the tests, use the linter to check if an
77# older test is no longer compatible with the latest SDK.
78./scripts/lint
79