openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
c5ede36c6e2138e64f5194ecd5015ddc7cf50ec7

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

78lines · modecode

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