openai/openai-python

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
08f54f5f53b3156548bdea2a70d5371738b7442d

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:
5 - main
6 pull_request:
7 branches:
8 - main
9 - next
10
11jobs:
12 lint:
13 name: lint
14 runs-on: ubuntu-latest
15 if: github.repository == 'openai/openai-python'
16
17 steps:
18 - uses: actions/checkout@v4
19
20 - name: Install Rye
21 run: |
22 curl -sSf https://rye.astral.sh/get | bash
23 echo "$HOME/.rye/shims" >> $GITHUB_PATH
24 env:
25 RYE_VERSION: '0.35.0'
26 RYE_INSTALL_OPTION: '--yes'
27
28 - name: Install dependencies
29 run: rye sync --all-features
30
31 - name: Run lints
32 run: ./scripts/lint
33
34 test:
35 name: test
36 runs-on: ubuntu-latest
37 if: github.repository == 'openai/openai-python'
38
39 steps:
40 - uses: actions/checkout@v4
41
42 - name: Install Rye
43 run: |
44 curl -sSf https://rye.astral.sh/get | bash
45 echo "$HOME/.rye/shims" >> $GITHUB_PATH
46 env:
47 RYE_VERSION: '0.35.0'
48 RYE_INSTALL_OPTION: '--yes'
49
50 - name: Bootstrap
51 run: ./scripts/bootstrap
52
53 - name: Run tests
54 run: ./scripts/test
55
56 examples:
57 name: examples
58 runs-on: ubuntu-latest
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.35.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