openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.105.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

127lines · modeblame

08b8179aDavid Schnurr2 years ago1name: CI
2on:
3push:
c1ceebbdstainless-app[bot]1 years ago4branches-ignore:
5- 'generated'
6- 'codegen/**'
7- 'integrated/**'
8- 'stl-preview-head/**'
9- 'stl-preview-base/**'
ec6532a7stainless-app[bot]1 years ago10pull_request:
11branches-ignore:
12- 'stl-preview-head/**'
13- 'stl-preview-base/**'
08b8179aDavid Schnurr2 years ago14
15jobs:
16lint:
271d979astainless-app[bot]1 years ago17timeout-minutes: 10
08b8179aDavid Schnurr2 years ago18name: lint
c9cedd8astainless-app[bot]1 years ago19runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
b106b6e5stainless-app[bot]12 months ago20if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
08b8179aDavid Schnurr2 years ago21steps:
f0b18239Stainless Bot2 years ago22- uses: actions/checkout@v4
08b8179aDavid Schnurr2 years ago23
24- name: Install Rye
25run: |
001965beStainless Bot2 years ago26curl -sSf https://rye.astral.sh/get | bash
08b8179aDavid Schnurr2 years ago27echo "$HOME/.rye/shims" >> $GITHUB_PATH
28env:
d664ff22stainless-app[bot]1 years ago29RYE_VERSION: '0.44.0'
b36b8d86Stainless Bot2 years ago30RYE_INSTALL_OPTION: '--yes'
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]11 months ago38build:
4e28a424stainless-app[bot]10 months ago39if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
98925cefstainless-app[bot]1 years ago40timeout-minutes: 10
be1f58f0stainless-app[bot]11 months 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:
47- uses: actions/checkout@v4
48
be1f58f0stainless-app[bot]11 months ago49- name: Install Rye
50run: |
51curl -sSf https://rye.astral.sh/get | bash
52echo "$HOME/.rye/shims" >> $GITHUB_PATH
53env:
54RYE_VERSION: '0.44.0'
55RYE_INSTALL_OPTION: '--yes'
56
57- name: Install dependencies
58run: rye sync --all-features
59
60- name: Run build
61run: rye build
62
98925cefstainless-app[bot]1 years ago63- name: Get GitHub OIDC Token
4e28a424stainless-app[bot]10 months ago64if: github.repository == 'stainless-sdks/openai-python'
98925cefstainless-app[bot]1 years ago65id: github-oidc
66uses: actions/github-script@v6
67with:
68script: core.setOutput('github_token', await core.getIDToken());
69
70- name: Upload tarball
4e28a424stainless-app[bot]10 months ago71if: github.repository == 'stainless-sdks/openai-python'
98925cefstainless-app[bot]1 years ago72env:
73URL: https://pkg.stainless.com/s
74AUTH: ${{ steps.github-oidc.outputs.github_token }}
75SHA: ${{ github.sha }}
76run: ./scripts/utils/upload-artifact.sh
77
d2738d42Stainless Bot2 years ago78test:
271d979astainless-app[bot]1 years ago79timeout-minutes: 10
d2738d42Stainless Bot2 years ago80name: test
c9cedd8astainless-app[bot]1 years ago81runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
b106b6e5stainless-app[bot]12 months ago82if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
d2738d42Stainless Bot2 years ago83steps:
84- uses: actions/checkout@v4
85
86- name: Install Rye
87run: |
001965beStainless Bot2 years ago88curl -sSf https://rye.astral.sh/get | bash
d2738d42Stainless Bot2 years ago89echo "$HOME/.rye/shims" >> $GITHUB_PATH
90env:
d664ff22stainless-app[bot]1 years ago91RYE_VERSION: '0.44.0'
d2738d42Stainless Bot2 years ago92RYE_INSTALL_OPTION: '--yes'
93
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
c9cedd8astainless-app[bot]1 years ago103runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
e4cacb86stainless-app[bot]12 months ago104if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
b31f4d4cstainless-app[bot]1 years ago105
106steps:
107- uses: actions/checkout@v4
108
109- name: Install Rye
110run: |
111curl -sSf https://rye.astral.sh/get | bash
112echo "$HOME/.rye/shims" >> $GITHUB_PATH
113env:
d664ff22stainless-app[bot]1 years ago114RYE_VERSION: '0.44.0'
b31f4d4cstainless-app[bot]1 years ago115RYE_INSTALL_OPTION: '--yes'
116- name: Install dependencies
117run: |
118rye sync --all-features
119
52b183d5stainless-app[bot]1 years ago120- env:
b31f4d4cstainless-app[bot]1 years ago121OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
122run: |
123rye run python examples/demo.py
52b183d5stainless-app[bot]1 years ago124- env:
b31f4d4cstainless-app[bot]1 years ago125OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
126run: |
127rye run python examples/async_demo.py