openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.42.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

126lines · 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
98925cefstainless-app[bot]1 years ago61- name: Get GitHub OIDC Token
0a4ca536stainless-app[bot]3 months ago62if: |-
63github.repository == 'stainless-sdks/openai-python' &&
64!startsWith(github.ref, 'refs/heads/stl/')
98925cefstainless-app[bot]1 years ago65id: github-oidc
58184ad5Drew Hintz3 months ago66uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
98925cefstainless-app[bot]1 years ago67with:
68script: core.setOutput('github_token', await core.getIDToken());
69
70- name: Upload tarball
0a4ca536stainless-app[bot]3 months ago71if: |-
72github.repository == 'stainless-sdks/openai-python' &&
73!startsWith(github.ref, 'refs/heads/stl/')
98925cefstainless-app[bot]1 years ago74env:
75URL: https://pkg.stainless.com/s
76AUTH: ${{ steps.github-oidc.outputs.github_token }}
77SHA: ${{ github.sha }}
78run: ./scripts/utils/upload-artifact.sh
79
d2738d42Stainless Bot2 years ago80test:
271d979astainless-app[bot]1 years ago81timeout-minutes: 10
d2738d42Stainless Bot2 years ago82name: test
c9cedd8astainless-app[bot]1 years ago83runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
b106b6e5stainless-app[bot]1 years ago84if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
d2738d42Stainless Bot2 years ago85steps:
58184ad5Drew Hintz3 months ago86- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
d2738d42Stainless Bot2 years ago87
e507a4ebstainless-app[bot]2 months ago88- name: Set up Rye
89uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
90with:
91version: '0.44.0'
92enable-cache: true
d2738d42Stainless Bot2 years ago93
94- name: Bootstrap
95run: ./scripts/bootstrap
96
97- name: Run tests
98run: ./scripts/test
b31f4d4cstainless-app[bot]1 years ago99
100examples:
271d979astainless-app[bot]1 years ago101timeout-minutes: 10
b31f4d4cstainless-app[bot]1 years ago102name: examples
d64d811eJustin Beckwith3 weeks ago103environment: ci
c9cedd8astainless-app[bot]1 years ago104runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
23bc0270stainless-app[bot]3 months ago105if: 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 ago106
107steps:
58184ad5Drew Hintz3 months ago108- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
b31f4d4cstainless-app[bot]1 years ago109
e507a4ebstainless-app[bot]2 months ago110- name: Set up Rye
111uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
112with:
113version: '0.44.0'
114enable-cache: true
b31f4d4cstainless-app[bot]1 years ago115- name: Install dependencies
116run: |
117rye sync --all-features
118
52b183d5stainless-app[bot]1 years ago119- env:
b31f4d4cstainless-app[bot]1 years ago120OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
121run: |
122rye run python examples/demo.py
52b183d5stainless-app[bot]1 years ago123- env:
b31f4d4cstainless-app[bot]1 years ago124OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
125run: |
126rye run python examples/async_demo.py