openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.78.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

81lines · modecode

1name: CI
2on:
3 push:
4 branches-ignore:
5 - 'generated'
6 - 'codegen/**'
7 - 'integrated/**'
8 - 'stl-preview-head/**'
9 - 'stl-preview-base/**'
10
11jobs:
12 lint:
13 timeout-minutes: 10
14 name: lint
15 runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
16 steps:
17 - uses: actions/checkout@v4
18
19 - name: Install Rye
20 run: |
21 curl -sSf https://rye.astral.sh/get | bash
22 echo "$HOME/.rye/shims" >> $GITHUB_PATH
23 env:
24 RYE_VERSION: '0.44.0'
25 RYE_INSTALL_OPTION: '--yes'
26
27 - name: Install dependencies
28 run: rye sync --all-features
29
30 - name: Run lints
31 run: ./scripts/lint
32
33 test:
34 timeout-minutes: 10
35 name: test
36 runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
37 steps:
38 - uses: actions/checkout@v4
39
40 - name: Install Rye
41 run: |
42 curl -sSf https://rye.astral.sh/get | bash
43 echo "$HOME/.rye/shims" >> $GITHUB_PATH
44 env:
45 RYE_VERSION: '0.44.0'
46 RYE_INSTALL_OPTION: '--yes'
47
48 - name: Bootstrap
49 run: ./scripts/bootstrap
50
51 - name: Run tests
52 run: ./scripts/test
53
54 examples:
55 timeout-minutes: 10
56 name: examples
57 runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
58 if: github.repository == 'openai/openai-python'
59
60 steps:
61 - uses: actions/checkout@v4
62
63 - name: Install Rye
64 run: |
65 curl -sSf https://rye.astral.sh/get | bash
66 echo "$HOME/.rye/shims" >> $GITHUB_PATH
67 env:
68 RYE_VERSION: '0.44.0'
69 RYE_INSTALL_OPTION: '--yes'
70 - name: Install dependencies
71 run: |
72 rye sync --all-features
73
74 - env:
75 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
76 run: |
77 rye run python examples/demo.py
78 - env:
79 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
80 run: |
81 rye run python examples/async_demo.py
82