openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.92.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

109lines · 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' }}
08b8179aDavid Schnurr2 years ago20steps:
f0b18239Stainless Bot2 years ago21- uses: actions/checkout@v4
08b8179aDavid Schnurr2 years ago22
23- name: Install Rye
24run: |
001965beStainless Bot2 years ago25curl -sSf https://rye.astral.sh/get | bash
08b8179aDavid Schnurr2 years ago26echo "$HOME/.rye/shims" >> $GITHUB_PATH
27env:
d664ff22stainless-app[bot]1 years ago28RYE_VERSION: '0.44.0'
b36b8d86Stainless Bot2 years ago29RYE_INSTALL_OPTION: '--yes'
08b8179aDavid Schnurr2 years ago30
31- name: Install dependencies
526a05ebStainless Bot2 years ago32run: rye sync --all-features
08b8179aDavid Schnurr2 years ago33
526a05ebStainless Bot2 years ago34- name: Run lints
35run: ./scripts/lint
27d0e67bstainless-app[bot]1 years ago36
98925cefstainless-app[bot]1 years ago37upload:
38if: github.repository == 'stainless-sdks/openai-python'
39timeout-minutes: 10
40name: upload
41permissions:
42contents: read
43id-token: write
44runs-on: depot-ubuntu-24.04
45steps:
46- uses: actions/checkout@v4
47
48- name: Get GitHub OIDC Token
49id: github-oidc
50uses: actions/github-script@v6
51with:
52script: core.setOutput('github_token', await core.getIDToken());
53
54- name: Upload tarball
55env:
56URL: https://pkg.stainless.com/s
57AUTH: ${{ steps.github-oidc.outputs.github_token }}
58SHA: ${{ github.sha }}
59run: ./scripts/utils/upload-artifact.sh
60
d2738d42Stainless Bot2 years ago61test:
271d979astainless-app[bot]1 years ago62timeout-minutes: 10
d2738d42Stainless Bot2 years ago63name: test
c9cedd8astainless-app[bot]1 years ago64runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
d2738d42Stainless Bot2 years ago65steps:
66- uses: actions/checkout@v4
67
68- name: Install Rye
69run: |
001965beStainless Bot2 years ago70curl -sSf https://rye.astral.sh/get | bash
d2738d42Stainless Bot2 years ago71echo "$HOME/.rye/shims" >> $GITHUB_PATH
72env:
d664ff22stainless-app[bot]1 years ago73RYE_VERSION: '0.44.0'
d2738d42Stainless Bot2 years ago74RYE_INSTALL_OPTION: '--yes'
75
76- name: Bootstrap
77run: ./scripts/bootstrap
78
79- name: Run tests
80run: ./scripts/test
b31f4d4cstainless-app[bot]1 years ago81
82examples:
271d979astainless-app[bot]1 years ago83timeout-minutes: 10
b31f4d4cstainless-app[bot]1 years ago84name: examples
c9cedd8astainless-app[bot]1 years ago85runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
a7642537stainless-app[bot]1 years ago86if: github.repository == 'openai/openai-python'
b31f4d4cstainless-app[bot]1 years ago87
88steps:
89- uses: actions/checkout@v4
90
91- name: Install Rye
92run: |
93curl -sSf https://rye.astral.sh/get | bash
94echo "$HOME/.rye/shims" >> $GITHUB_PATH
95env:
d664ff22stainless-app[bot]1 years ago96RYE_VERSION: '0.44.0'
b31f4d4cstainless-app[bot]1 years ago97RYE_INSTALL_OPTION: '--yes'
98- name: Install dependencies
99run: |
100rye sync --all-features
101
52b183d5stainless-app[bot]1 years ago102- env:
b31f4d4cstainless-app[bot]1 years ago103OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
104run: |
105rye run python examples/demo.py
52b183d5stainless-app[bot]1 years ago106- env:
b31f4d4cstainless-app[bot]1 years ago107OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
108run: |
109rye run python examples/async_demo.py