openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.81.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

105lines · 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/**'
08b8179aDavid Schnurr2 years ago10
11jobs:
12lint:
271d979astainless-app[bot]1 years ago13timeout-minutes: 10
08b8179aDavid Schnurr2 years ago14name: lint
c9cedd8astainless-app[bot]1 years ago15runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
08b8179aDavid Schnurr2 years ago16steps:
f0b18239Stainless Bot2 years ago17- uses: actions/checkout@v4
08b8179aDavid Schnurr2 years ago18
19- name: Install Rye
20run: |
001965beStainless Bot2 years ago21curl -sSf https://rye.astral.sh/get | bash
08b8179aDavid Schnurr2 years ago22echo "$HOME/.rye/shims" >> $GITHUB_PATH
23env:
d664ff22stainless-app[bot]1 years ago24RYE_VERSION: '0.44.0'
b36b8d86Stainless Bot2 years ago25RYE_INSTALL_OPTION: '--yes'
08b8179aDavid Schnurr2 years ago26
27- name: Install dependencies
526a05ebStainless Bot2 years ago28run: rye sync --all-features
08b8179aDavid Schnurr2 years ago29
526a05ebStainless Bot2 years ago30- name: Run lints
31run: ./scripts/lint
27d0e67bstainless-app[bot]1 years ago32
98925cefstainless-app[bot]1 years ago33upload:
34if: github.repository == 'stainless-sdks/openai-python'
35timeout-minutes: 10
36name: upload
37permissions:
38contents: read
39id-token: write
40runs-on: depot-ubuntu-24.04
41steps:
42- uses: actions/checkout@v4
43
44- name: Get GitHub OIDC Token
45id: github-oidc
46uses: actions/github-script@v6
47with:
48script: core.setOutput('github_token', await core.getIDToken());
49
50- name: Upload tarball
51env:
52URL: https://pkg.stainless.com/s
53AUTH: ${{ steps.github-oidc.outputs.github_token }}
54SHA: ${{ github.sha }}
55run: ./scripts/utils/upload-artifact.sh
56
d2738d42Stainless Bot2 years ago57test:
271d979astainless-app[bot]1 years ago58timeout-minutes: 10
d2738d42Stainless Bot2 years ago59name: test
c9cedd8astainless-app[bot]1 years ago60runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
d2738d42Stainless Bot2 years ago61steps:
62- uses: actions/checkout@v4
63
64- name: Install Rye
65run: |
001965beStainless Bot2 years ago66curl -sSf https://rye.astral.sh/get | bash
d2738d42Stainless Bot2 years ago67echo "$HOME/.rye/shims" >> $GITHUB_PATH
68env:
d664ff22stainless-app[bot]1 years ago69RYE_VERSION: '0.44.0'
d2738d42Stainless Bot2 years ago70RYE_INSTALL_OPTION: '--yes'
71
72- name: Bootstrap
73run: ./scripts/bootstrap
74
75- name: Run tests
76run: ./scripts/test
b31f4d4cstainless-app[bot]1 years ago77
78examples:
271d979astainless-app[bot]1 years ago79timeout-minutes: 10
b31f4d4cstainless-app[bot]1 years ago80name: examples
c9cedd8astainless-app[bot]1 years ago81runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
a7642537stainless-app[bot]1 years ago82if: github.repository == 'openai/openai-python'
b31f4d4cstainless-app[bot]1 years ago83
84steps:
85- uses: actions/checkout@v4
86
87- name: Install Rye
88run: |
89curl -sSf https://rye.astral.sh/get | bash
90echo "$HOME/.rye/shims" >> $GITHUB_PATH
91env:
d664ff22stainless-app[bot]1 years ago92RYE_VERSION: '0.44.0'
b31f4d4cstainless-app[bot]1 years ago93RYE_INSTALL_OPTION: '--yes'
94- name: Install dependencies
95run: |
96rye sync --all-features
97
98- env:
99OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100run: |
101rye run python examples/demo.py
102- env:
103OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
104run: |
105rye run python examples/async_demo.py