| 1 |
#!/usr/bin/env bash |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
cd "$(dirname "$0")/.." |
| 6 |
|
| 7 |
echo "==> Detecting breaking changes" |
| 8 |
|
| 9 |
TEST_PATHS=( tests/api_resources tests/test_client.py tests/test_response.py ) |
| 10 |
|
| 11 |
for PATHSPEC in "${TEST_PATHS[@]}"; do |
| 12 |
# Try to check out previous versions of the test files |
| 13 |
# with the current SDK. |
| 14 |
git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true |
| 15 |
done |
| 16 |
|
| 17 |
# Instead of running the tests, use the linter to check if an |
| 18 |
# older test is no longer compatible with the latest SDK. |
| 19 |
./scripts/lint |