openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.80.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

105lines · 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 upload:
34 if: github.repository == 'stainless-sdks/openai-python'
35 timeout-minutes: 10
36 name: upload
37 permissions:
38 contents: read
39 id-token: write
40 runs-on: depot-ubuntu-24.04
41 steps:
42 - uses: actions/checkout@v4
43
44 - name: Get GitHub OIDC Token
45 id: github-oidc
46 uses: actions/github-script@v6
47 with:
48 script: core.setOutput('github_token', await core.getIDToken());
49
50 - name: Upload tarball
51 env:
52 URL: https://pkg.stainless.com/s
53 AUTH: ${{ steps.github-oidc.outputs.github_token }}
54 SHA: ${{ github.sha }}
55 run: ./scripts/utils/upload-artifact.sh
56
57 test:
58 timeout-minutes: 10
59 name: test
60 runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
61 steps:
62 - uses: actions/checkout@v4
63
64 - name: Install Rye
65 run: |
66 curl -sSf https://rye.astral.sh/get | bash
67 echo "$HOME/.rye/shims" >> $GITHUB_PATH
68 env:
69 RYE_VERSION: '0.44.0'
70 RYE_INSTALL_OPTION: '--yes'
71
72 - name: Bootstrap
73 run: ./scripts/bootstrap
74
75 - name: Run tests
76 run: ./scripts/test
77
78 examples:
79 timeout-minutes: 10
80 name: examples
81 runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
82 if: github.repository == 'openai/openai-python'
83
84 steps:
85 - uses: actions/checkout@v4
86
87 - name: Install Rye
88 run: |
89 curl -sSf https://rye.astral.sh/get | bash
90 echo "$HOME/.rye/shims" >> $GITHUB_PATH
91 env:
92 RYE_VERSION: '0.44.0'
93 RYE_INSTALL_OPTION: '--yes'
94 - name: Install dependencies
95 run: |
96 rye sync --all-features
97
98 - env:
99 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100 run: |
101 rye run python examples/demo.py
102 - env:
103 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
104 run: |
105 rye run python examples/async_demo.py
106