openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
.github/workflows/ci.yml
81lines · modeblame
08b8179aDavid Schnurr2 years ago | 1 | name: CI |
| 2 | on: | |
| 3 | push: | |
c1ceebbdstainless-app[bot]1 years ago | 4 | branches-ignore: |
| 5 | - 'generated' | |
| 6 | - 'codegen/**' | |
| 7 | - 'integrated/**' | |
| 8 | - 'stl-preview-head/**' | |
| 9 | - 'stl-preview-base/**' | |
08b8179aDavid Schnurr2 years ago | 10 | |
| 11 | jobs: | |
| 12 | lint: | |
271d979astainless-app[bot]1 years ago | 13 | timeout-minutes: 10 |
08b8179aDavid Schnurr2 years ago | 14 | name: lint |
c9cedd8astainless-app[bot]1 years ago | 15 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
08b8179aDavid Schnurr2 years ago | 16 | steps: |
f0b18239Stainless Bot2 years ago | 17 | - uses: actions/checkout@v4 |
08b8179aDavid Schnurr2 years ago | 18 | |
| 19 | - name: Install Rye | |
| 20 | run: | | |
001965beStainless Bot2 years ago | 21 | curl -sSf https://rye.astral.sh/get | bash |
08b8179aDavid Schnurr2 years ago | 22 | echo "$HOME/.rye/shims" >> $GITHUB_PATH |
| 23 | env: | |
d664ff22stainless-app[bot]1 years ago | 24 | RYE_VERSION: '0.44.0' |
b36b8d86Stainless Bot2 years ago | 25 | RYE_INSTALL_OPTION: '--yes' |
08b8179aDavid Schnurr2 years ago | 26 | |
| 27 | - name: Install dependencies | |
526a05ebStainless Bot2 years ago | 28 | run: rye sync --all-features |
08b8179aDavid Schnurr2 years ago | 29 | |
526a05ebStainless Bot2 years ago | 30 | - name: Run lints |
| 31 | run: ./scripts/lint | |
27d0e67bstainless-app[bot]1 years ago | 32 | |
d2738d42Stainless Bot2 years ago | 33 | test: |
271d979astainless-app[bot]1 years ago | 34 | timeout-minutes: 10 |
d2738d42Stainless Bot2 years ago | 35 | name: test |
c9cedd8astainless-app[bot]1 years ago | 36 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d2738d42Stainless Bot2 years ago | 37 | steps: |
| 38 | - uses: actions/checkout@v4 | |
| 39 | | |
| 40 | - name: Install Rye | |
| 41 | run: | | |
001965beStainless Bot2 years ago | 42 | curl -sSf https://rye.astral.sh/get | bash |
d2738d42Stainless Bot2 years ago | 43 | echo "$HOME/.rye/shims" >> $GITHUB_PATH |
| 44 | env: | |
d664ff22stainless-app[bot]1 years ago | 45 | RYE_VERSION: '0.44.0' |
d2738d42Stainless Bot2 years ago | 46 | RYE_INSTALL_OPTION: '--yes' |
| 47 | | |
| 48 | - name: Bootstrap | |
| 49 | run: ./scripts/bootstrap | |
| 50 | | |
| 51 | - name: Run tests | |
| 52 | run: ./scripts/test | |
b31f4d4cstainless-app[bot]1 years ago | 53 | |
| 54 | examples: | |
271d979astainless-app[bot]1 years ago | 55 | timeout-minutes: 10 |
b31f4d4cstainless-app[bot]1 years ago | 56 | name: examples |
c9cedd8astainless-app[bot]1 years ago | 57 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
a7642537stainless-app[bot]1 years ago | 58 | if: github.repository == 'openai/openai-python' |
b31f4d4cstainless-app[bot]1 years ago | 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: | |
d664ff22stainless-app[bot]1 years ago | 68 | RYE_VERSION: '0.44.0' |
b31f4d4cstainless-app[bot]1 years ago | 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 |