openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
loomb-oai-patch-1

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

129lines · modeblame

08b8179aDavid Schnurr2 years ago1name: CI
2on:
3push:
cf8e9e7bstainless-app[bot]3 months ago4branches:
5- '**'
6- '!integrated/**'
7- '!stl-preview-head/**'
8- '!stl-preview-base/**'
9- '!generated'
10- '!codegen/**'
11- 'codegen/stl/**'
ec6532a7stainless-app[bot]1 years ago12pull_request:
13branches-ignore:
14- 'stl-preview-head/**'
15- 'stl-preview-base/**'
08b8179aDavid Schnurr2 years ago16
17jobs:
18lint:
271d979astainless-app[bot]1 years ago19timeout-minutes: 10
08b8179aDavid Schnurr2 years ago20name: lint
c9cedd8astainless-app[bot]1 years ago21runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
23bc0270stainless-app[bot]3 months ago22if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
08b8179aDavid Schnurr2 years ago23steps:
58184ad5Drew Hintz3 months ago24- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
08b8179aDavid Schnurr2 years ago25
e507a4ebstainless-app[bot]2 months ago26- name: Set up Rye
27uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
28with:
29version: '0.44.0'
30enable-cache: true
08b8179aDavid Schnurr2 years ago31
32- name: Install dependencies
526a05ebStainless Bot2 years ago33run: rye sync --all-features
08b8179aDavid Schnurr2 years ago34
526a05ebStainless Bot2 years ago35- name: Run lints
36run: ./scripts/lint
27d0e67bstainless-app[bot]1 years ago37
be1f58f0stainless-app[bot]1 years ago38build:
23bc0270stainless-app[bot]3 months ago39if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
98925cefstainless-app[bot]1 years ago40timeout-minutes: 10
be1f58f0stainless-app[bot]1 years ago41name: build
98925cefstainless-app[bot]1 years ago42permissions:
43contents: read
44id-token: write
9fd9df51stainless-app[bot]10 months ago45runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
98925cefstainless-app[bot]1 years ago46steps:
58184ad5Drew Hintz3 months ago47- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
98925cefstainless-app[bot]1 years ago48
e507a4ebstainless-app[bot]2 months ago49- name: Set up Rye
50uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
51with:
52version: '0.44.0'
53enable-cache: true
be1f58f0stainless-app[bot]1 years ago54
55- name: Install dependencies
56run: rye sync --all-features
57
58- name: Run build
59run: rye build
60
d3562752Hayden2 weeks ago61- name: Validate Bedrock wheel
62run: rye run python scripts/utils/validate-bedrock-wheel.py
63
98925cefstainless-app[bot]1 years ago64- name: Get GitHub OIDC Token
0a4ca536stainless-app[bot]3 months ago65if: |-
66github.repository == 'stainless-sdks/openai-python' &&
67!startsWith(github.ref, 'refs/heads/stl/')
98925cefstainless-app[bot]1 years ago68id: github-oidc
58184ad5Drew Hintz3 months ago69uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
98925cefstainless-app[bot]1 years ago70with:
71script: core.setOutput('github_token', await core.getIDToken());
72
73- name: Upload tarball
0a4ca536stainless-app[bot]3 months ago74if: |-
75github.repository == 'stainless-sdks/openai-python' &&
76!startsWith(github.ref, 'refs/heads/stl/')
98925cefstainless-app[bot]1 years ago77env:
78URL: https://pkg.stainless.com/s
79AUTH: ${{ steps.github-oidc.outputs.github_token }}
80SHA: ${{ github.sha }}
81run: ./scripts/utils/upload-artifact.sh
82
d2738d42Stainless Bot2 years ago83test:
271d979astainless-app[bot]1 years ago84timeout-minutes: 10
d2738d42Stainless Bot2 years ago85name: test
c9cedd8astainless-app[bot]1 years ago86runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
b106b6e5stainless-app[bot]1 years ago87if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
d2738d42Stainless Bot2 years ago88steps:
58184ad5Drew Hintz3 months ago89- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
d2738d42Stainless Bot2 years ago90
e507a4ebstainless-app[bot]2 months ago91- name: Set up Rye
92uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
93with:
94version: '0.44.0'
95enable-cache: true
d2738d42Stainless Bot2 years ago96
97- name: Bootstrap
98run: ./scripts/bootstrap
99
100- name: Run tests
101run: ./scripts/test
b31f4d4cstainless-app[bot]1 years ago102
103examples:
271d979astainless-app[bot]1 years ago104timeout-minutes: 10
b31f4d4cstainless-app[bot]1 years ago105name: examples
d64d811eJustin Beckwith4 weeks ago106environment: ci
c9cedd8astainless-app[bot]1 years ago107runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
23bc0270stainless-app[bot]3 months ago108if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
b31f4d4cstainless-app[bot]1 years ago109
110steps:
58184ad5Drew Hintz3 months ago111- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
b31f4d4cstainless-app[bot]1 years ago112
e507a4ebstainless-app[bot]2 months ago113- name: Set up Rye
114uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
115with:
116version: '0.44.0'
117enable-cache: true
b31f4d4cstainless-app[bot]1 years ago118- name: Install dependencies
119run: |
120rye sync --all-features
121
52b183d5stainless-app[bot]1 years ago122- env:
b31f4d4cstainless-app[bot]1 years ago123OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
124run: |
125rye run python examples/demo.py
52b183d5stainless-app[bot]1 years ago126- env:
b31f4d4cstainless-app[bot]1 years ago127OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
128run: |
129rye run python examples/async_demo.py