openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
5020669996e299ee268db2f2f45f7b7cefc0ccd6

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

79lines · modecode

1name: CI
2on:
3 push:
4 branches-ignore:
5 - 'generated'
6 - 'codegen/**'
7 - 'integrated/**'
8 - 'preview-head/**'
9 - 'preview-base/**'
10 - 'preview/**'
11
12jobs:
13 lint:
14 name: lint
15 runs-on: 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 name: test
35 runs-on: ubuntu-latest
36 steps:
37 - uses: actions/checkout@v4
38
39 - name: Install Rye
40 run: |
41 curl -sSf https://rye.astral.sh/get | bash
42 echo "$HOME/.rye/shims" >> $GITHUB_PATH
43 env:
44 RYE_VERSION: '0.44.0'
45 RYE_INSTALL_OPTION: '--yes'
46
47 - name: Bootstrap
48 run: ./scripts/bootstrap
49
50 - name: Run tests
51 run: ./scripts/test
52
53 examples:
54 name: examples
55 runs-on: ubuntu-latest
56 if: github.repository == 'openai/openai-python'
57
58 steps:
59 - uses: actions/checkout@v4
60
61 - name: Install Rye
62 run: |
63 curl -sSf https://rye.astral.sh/get | bash
64 echo "$HOME/.rye/shims" >> $GITHUB_PATH
65 env:
66 RYE_VERSION: '0.44.0'
67 RYE_INSTALL_OPTION: '--yes'
68 - name: Install dependencies
69 run: |
70 rye sync --all-features
71
72 - env:
73 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
74 run: |
75 rye run python examples/demo.py
76 - env:
77 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
78 run: |
79 rye run python examples/async_demo.py