openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.76.2

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

81lines · 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
d2738d42Stainless Bot2 years ago33test:
271d979astainless-app[bot]1 years ago34timeout-minutes: 10
d2738d42Stainless Bot2 years ago35name: test
c9cedd8astainless-app[bot]1 years ago36runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
d2738d42Stainless Bot2 years ago37steps:
38- uses: actions/checkout@v4
39
40- name: Install Rye
41run: |
001965beStainless Bot2 years ago42curl -sSf https://rye.astral.sh/get | bash
d2738d42Stainless Bot2 years ago43echo "$HOME/.rye/shims" >> $GITHUB_PATH
44env:
d664ff22stainless-app[bot]1 years ago45RYE_VERSION: '0.44.0'
d2738d42Stainless Bot2 years ago46RYE_INSTALL_OPTION: '--yes'
47
48- name: Bootstrap
49run: ./scripts/bootstrap
50
51- name: Run tests
52run: ./scripts/test
b31f4d4cstainless-app[bot]1 years ago53
54examples:
271d979astainless-app[bot]1 years ago55timeout-minutes: 10
b31f4d4cstainless-app[bot]1 years ago56name: examples
c9cedd8astainless-app[bot]1 years ago57runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
a7642537stainless-app[bot]1 years ago58if: github.repository == 'openai/openai-python'
b31f4d4cstainless-app[bot]1 years ago59
60steps:
61- uses: actions/checkout@v4
62
63- name: Install Rye
64run: |
65curl -sSf https://rye.astral.sh/get | bash
66echo "$HOME/.rye/shims" >> $GITHUB_PATH
67env:
d664ff22stainless-app[bot]1 years ago68RYE_VERSION: '0.44.0'
b31f4d4cstainless-app[bot]1 years ago69RYE_INSTALL_OPTION: '--yes'
70- name: Install dependencies
71run: |
72rye sync --all-features
73
74- env:
75OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
76run: |
77rye run python examples/demo.py
78- env:
79OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
80run: |
81rye run python examples/async_demo.py