openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.15.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/detect-breaking-changes.yml

90lines · modecode

1name: CI
2on:
3 pull_request:
4 branches:
5 - main
6 - next
7
8jobs:
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 - name: Detect removed symbols
34 run: |
35 rye run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}"
36
37 - name: Detect breaking changes
38 run: |
39 # Try to check out previous versions of the breaking change detection script. This ensures that
40 # we still detect breaking changes when entire files and their tests are removed.
41 git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true
42 ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}
43
44 agents_sdk:
45 runs-on: 'ubuntu-latest'
46 name: Detect Agents SDK regressions
47 if: github.repository == 'openai/openai-python'
48 steps:
49 # Setup this sdk
50 - uses: actions/checkout@v4
51 with:
52 path: openai-python
53
54 - name: Install Rye
55 working-directory: openai-python
56 run: |
57 curl -sSf https://rye.astral.sh/get | bash
58 echo "$HOME/.rye/shims" >> $GITHUB_PATH
59 env:
60 RYE_VERSION: '0.44.0'
61 RYE_INSTALL_OPTION: '--yes'
62
63 - name: Install dependencies
64 working-directory: openai-python
65 run: |
66 rye sync --all-features
67
68 # Setup the agents lib
69 - uses: actions/checkout@v4
70 with:
71 repository: openai/openai-agents-python
72 path: openai-agents-python
73
74 - name: Setup uv
75 uses: astral-sh/setup-uv@v5
76 with:
77 enable-cache: true
78
79 - name: Link to local SDK
80 working-directory: openai-agents-python
81 run: uv add ../openai-python
82
83 - name: Install dependencies
84 working-directory: openai-agents-python
85 run: make sync
86
87 - name: Run integration type checks
88 working-directory: openai-agents-python
89 run: make mypy
90
91