openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
scripts/detect-breaking-changes
24lines · modeblame
72e0ad60stainless-app[bot]10 months ago | 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 | |
| 11 | tests/test_client.py | |
| 12 | tests/test_response.py | |
| 13 | tests/test_legacy_response.py | |
| 14 | ) | |
| 15 | | |
| 16 | for PATHSPEC in "${TEST_PATHS[@]}"; do | |
| 17 | # Try to check out previous versions of the test files | |
| 18 | # with the current SDK. | |
| 19 | git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true | |
| 20 | done | |
| 21 | | |
| 22 | # Instead of running the tests, use the linter to check if an | |
| 23 | # older test is no longer compatible with the latest SDK. | |
8be99070Alex Chang5 months ago | 24 | PYRIGHT_PROJECT=scripts/pyrightconfig.breaking-changes.json ./scripts/lint |