openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.99.8

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

125lines · 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:
e4cacb86stainless-app[bot]12 months ago39if: github.repository == 'stainless-sdks/openai-python' && (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
45runs-on: depot-ubuntu-24.04
46steps:
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
64id: github-oidc
65uses: actions/github-script@v6
66with:
67script: core.setOutput('github_token', await core.getIDToken());
68
69- name: Upload tarball
70env:
71URL: https://pkg.stainless.com/s
72AUTH: ${{ steps.github-oidc.outputs.github_token }}
73SHA: ${{ github.sha }}
74run: ./scripts/utils/upload-artifact.sh
75
d2738d42Stainless Bot2 years ago76test:
271d979astainless-app[bot]1 years ago77timeout-minutes: 10
d2738d42Stainless Bot2 years ago78name: test
c9cedd8astainless-app[bot]1 years ago79runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
b106b6e5stainless-app[bot]12 months ago80if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
d2738d42Stainless Bot2 years ago81steps:
82- uses: actions/checkout@v4
83
84- name: Install Rye
85run: |
001965beStainless Bot2 years ago86curl -sSf https://rye.astral.sh/get | bash
d2738d42Stainless Bot2 years ago87echo "$HOME/.rye/shims" >> $GITHUB_PATH
88env:
d664ff22stainless-app[bot]1 years ago89RYE_VERSION: '0.44.0'
d2738d42Stainless Bot2 years ago90RYE_INSTALL_OPTION: '--yes'
91
92- name: Bootstrap
93run: ./scripts/bootstrap
94
95- name: Run tests
96run: ./scripts/test
b31f4d4cstainless-app[bot]1 years ago97
98examples:
271d979astainless-app[bot]1 years ago99timeout-minutes: 10
b31f4d4cstainless-app[bot]1 years ago100name: examples
c9cedd8astainless-app[bot]1 years ago101runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
e4cacb86stainless-app[bot]12 months ago102if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
b31f4d4cstainless-app[bot]1 years ago103
104steps:
105- uses: actions/checkout@v4
106
107- name: Install Rye
108run: |
109curl -sSf https://rye.astral.sh/get | bash
110echo "$HOME/.rye/shims" >> $GITHUB_PATH
111env:
d664ff22stainless-app[bot]1 years ago112RYE_VERSION: '0.44.0'
b31f4d4cstainless-app[bot]1 years ago113RYE_INSTALL_OPTION: '--yes'
114- name: Install dependencies
115run: |
116rye sync --all-features
117
52b183d5stainless-app[bot]1 years ago118- env:
b31f4d4cstainless-app[bot]1 years ago119OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
120run: |
121rye run python examples/demo.py
52b183d5stainless-app[bot]1 years ago122- env:
b31f4d4cstainless-app[bot]1 years ago123OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
124run: |
125rye run python examples/async_demo.py