Skip to content

Commit 346561f

Browse files
chore(internal): run example files in CI (openai#2160)
1 parent 6296907 commit 346561f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,30 @@ jobs:
5252

5353
- name: Run tests
5454
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

0 commit comments

Comments
 (0)