openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
.github/workflows/detect-breaking-changes.yml
83lines · modeblame
72e0ad60stainless-app[bot]10 months ago | 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 | | |
58184ad5Drew Hintz3 months ago | 18 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
72e0ad60stainless-app[bot]10 months ago | 19 | with: |
| 20 | # Ensure we can check out the pull request base in the script below. | |
| 21 | fetch-depth: ${{ env.FETCH_DEPTH }} | |
| 22 | | |
e507a4ebstainless-app[bot]2 months ago | 23 | - name: Set up Rye |
| 24 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 | |
| 25 | with: | |
| 26 | version: '0.44.0' | |
| 27 | enable-cache: true | |
72e0ad60stainless-app[bot]10 months ago | 28 | - name: Install dependencies |
| 29 | run: | | |
| 30 | rye sync --all-features | |
| 31 | - name: Detect removed symbols | |
| 32 | run: | | |
| 33 | rye run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}" | |
| 34 | | |
| 35 | - name: Detect breaking changes | |
| 36 | run: | | |
8be99070Alex Chang5 months ago | 37 | test -f ./scripts/detect-breaking-changes || { echo "Missing scripts/detect-breaking-changes"; exit 1; } |
74b1e6f9cameron-stainless6 months ago | 38 | ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} |
| 39 | | |
| 40 | agents_sdk: | |
| 41 | runs-on: 'ubuntu-latest' | |
| 42 | name: Detect Agents SDK regressions | |
| 43 | if: github.repository == 'openai/openai-python' | |
| 44 | steps: | |
| 45 | # Setup this sdk | |
58184ad5Drew Hintz3 months ago | 46 | - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
74b1e6f9cameron-stainless6 months ago | 47 | with: |
| 48 | path: openai-python | |
| 49 | | |
e507a4ebstainless-app[bot]2 months ago | 50 | - name: Set up Rye |
| 51 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 | |
| 52 | with: | |
| 53 | version: '0.44.0' | |
| 54 | enable-cache: true | |
| 55 | working-directory: openai-python | |
74b1e6f9cameron-stainless6 months ago | 56 | |
| 57 | - name: Install dependencies | |
| 58 | working-directory: openai-python | |
| 59 | run: | | |
| 60 | rye sync --all-features | |
| 61 | | |
| 62 | # Setup the agents lib | |
58184ad5Drew Hintz3 months ago | 63 | - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
74b1e6f9cameron-stainless6 months ago | 64 | with: |
| 65 | repository: openai/openai-agents-python | |
| 66 | path: openai-agents-python | |
| 67 | | |
| 68 | - name: Setup uv | |
58184ad5Drew Hintz3 months ago | 69 | uses: astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081 # v5 |
74b1e6f9cameron-stainless6 months ago | 70 | with: |
| 71 | enable-cache: true | |
| 72 | | |
| 73 | - name: Link to local SDK | |
| 74 | working-directory: openai-agents-python | |
| 75 | run: uv add ../openai-python | |
| 76 | | |
| 77 | - name: Install dependencies | |
| 78 | working-directory: openai-agents-python | |
| 79 | run: make sync | |
| 80 | | |
| 81 | - name: Run integration type checks | |
| 82 | working-directory: openai-agents-python | |
| 83 | run: make mypy |