File tree Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ pull_request :
4+ branches :
5+ - main
6+ - next
7+
8+ jobs :
9+ detect_breaking_changes :
10+ runs-on : ' ubuntu-latest'
11+ name : detect-breaking-changes
12+ if : github.repository == 'openai/openai-python'
13+ steps :
14+ - name : Calculate fetch-depth
15+ run : |
16+ echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV
17+
18+ - uses : actions/checkout@v4
19+ with :
20+ # Ensure we can check out the pull request base in the script below.
21+ fetch-depth : ${{ env.FETCH_DEPTH }}
22+
23+ - name : Install Rye
24+ run : |
25+ curl -sSf https://rye.astral.sh/get | bash
26+ echo "$HOME/.rye/shims" >> $GITHUB_PATH
27+ env :
28+ RYE_VERSION : ' 0.44.0'
29+ RYE_INSTALL_OPTION : ' --yes'
30+ - name : Install dependencies
31+ run : |
32+ rye sync --all-features
33+
34+ - name : Detect breaking changes
35+ run : ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}
Original file line number Diff line number Diff line change 11configured_endpoints : 111
22openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ef4ecb19eb61e24c49d77fef769ee243e5279bc0bdbaee8d0f8dba4da8722559.yml
33openapi_spec_hash : 1b8a9767c9f04e6865b06c41948cdc24
4- config_hash : fd2af1d5eff0995bb7dc02ac9a34851d
4+ config_hash : cae2d1f187b5b9f8dfa00daa807da42a
Original file line number Diff line number Diff line change 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.
24+ ./scripts/lint
You can’t perform that action at this time.
0 commit comments