openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
.github/workflows/ci.yml
126lines · modeblame
08b8179aDavid Schnurr2 years ago | 1 | name: CI |
| 2 | on: | |
| 3 | push: | |
cf8e9e7bstainless-app[bot]3 months ago | 4 | branches: |
| 5 | - '**' | |
| 6 | - '!integrated/**' | |
| 7 | - '!stl-preview-head/**' | |
| 8 | - '!stl-preview-base/**' | |
| 9 | - '!generated' | |
| 10 | - '!codegen/**' | |
| 11 | - 'codegen/stl/**' | |
ec6532a7stainless-app[bot]1 years ago | 12 | pull_request: |
| 13 | branches-ignore: | |
| 14 | - 'stl-preview-head/**' | |
| 15 | - 'stl-preview-base/**' | |
08b8179aDavid Schnurr2 years ago | 16 | |
| 17 | jobs: | |
| 18 | lint: | |
271d979astainless-app[bot]1 years ago | 19 | timeout-minutes: 10 |
08b8179aDavid Schnurr2 years ago | 20 | name: lint |
c9cedd8astainless-app[bot]1 years ago | 21 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
23bc0270stainless-app[bot]3 months ago | 22 | if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') |
08b8179aDavid Schnurr2 years ago | 23 | steps: |
58184ad5Drew Hintz3 months ago | 24 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
08b8179aDavid Schnurr2 years ago | 25 | |
e507a4ebstainless-app[bot]2 months ago | 26 | - name: Set up Rye |
| 27 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 | |
| 28 | with: | |
| 29 | version: '0.44.0' | |
| 30 | enable-cache: true | |
08b8179aDavid Schnurr2 years ago | 31 | |
| 32 | - name: Install dependencies | |
526a05ebStainless Bot2 years ago | 33 | run: rye sync --all-features |
08b8179aDavid Schnurr2 years ago | 34 | |
526a05ebStainless Bot2 years ago | 35 | - name: Run lints |
| 36 | run: ./scripts/lint | |
27d0e67bstainless-app[bot]1 years ago | 37 | |
be1f58f0stainless-app[bot]1 years ago | 38 | build: |
23bc0270stainless-app[bot]3 months ago | 39 | if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') |
98925cefstainless-app[bot]1 years ago | 40 | timeout-minutes: 10 |
be1f58f0stainless-app[bot]1 years ago | 41 | name: build |
98925cefstainless-app[bot]1 years ago | 42 | permissions: |
| 43 | contents: read | |
| 44 | id-token: write | |
9fd9df51stainless-app[bot]10 months ago | 45 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
98925cefstainless-app[bot]1 years ago | 46 | steps: |
58184ad5Drew Hintz3 months ago | 47 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
98925cefstainless-app[bot]1 years ago | 48 | |
e507a4ebstainless-app[bot]2 months ago | 49 | - name: Set up Rye |
| 50 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 | |
| 51 | with: | |
| 52 | version: '0.44.0' | |
| 53 | enable-cache: true | |
be1f58f0stainless-app[bot]1 years ago | 54 | |
| 55 | - name: Install dependencies | |
| 56 | run: rye sync --all-features | |
| 57 | | |
| 58 | - name: Run build | |
| 59 | run: rye build | |
| 60 | | |
98925cefstainless-app[bot]1 years ago | 61 | - name: Get GitHub OIDC Token |
0a4ca536stainless-app[bot]3 months ago | 62 | if: |- |
| 63 | github.repository == 'stainless-sdks/openai-python' && | |
| 64 | !startsWith(github.ref, 'refs/heads/stl/') | |
98925cefstainless-app[bot]1 years ago | 65 | id: github-oidc |
58184ad5Drew Hintz3 months ago | 66 | uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 |
98925cefstainless-app[bot]1 years ago | 67 | with: |
| 68 | script: core.setOutput('github_token', await core.getIDToken()); | |
| 69 | | |
| 70 | - name: Upload tarball | |
0a4ca536stainless-app[bot]3 months ago | 71 | if: |- |
| 72 | github.repository == 'stainless-sdks/openai-python' && | |
| 73 | !startsWith(github.ref, 'refs/heads/stl/') | |
98925cefstainless-app[bot]1 years ago | 74 | env: |
| 75 | URL: https://pkg.stainless.com/s | |
| 76 | AUTH: ${{ steps.github-oidc.outputs.github_token }} | |
| 77 | SHA: ${{ github.sha }} | |
| 78 | run: ./scripts/utils/upload-artifact.sh | |
| 79 | | |
d2738d42Stainless Bot2 years ago | 80 | test: |
271d979astainless-app[bot]1 years ago | 81 | timeout-minutes: 10 |
d2738d42Stainless Bot2 years ago | 82 | name: test |
c9cedd8astainless-app[bot]1 years ago | 83 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
b106b6e5stainless-app[bot]1 years ago | 84 | if: github.event_name == 'push' || github.event.pull_request.head.repo.fork |
d2738d42Stainless Bot2 years ago | 85 | steps: |
58184ad5Drew Hintz3 months ago | 86 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
d2738d42Stainless Bot2 years ago | 87 | |
e507a4ebstainless-app[bot]2 months ago | 88 | - name: Set up Rye |
| 89 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 | |
| 90 | with: | |
| 91 | version: '0.44.0' | |
| 92 | enable-cache: true | |
d2738d42Stainless Bot2 years ago | 93 | |
| 94 | - name: Bootstrap | |
| 95 | run: ./scripts/bootstrap | |
| 96 | | |
| 97 | - name: Run tests | |
| 98 | run: ./scripts/test | |
b31f4d4cstainless-app[bot]1 years ago | 99 | |
| 100 | examples: | |
271d979astainless-app[bot]1 years ago | 101 | timeout-minutes: 10 |
b31f4d4cstainless-app[bot]1 years ago | 102 | name: examples |
d64d811eJustin Beckwith3 weeks ago | 103 | environment: ci |
c9cedd8astainless-app[bot]1 years ago | 104 | runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
23bc0270stainless-app[bot]3 months ago | 105 | if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') |
b31f4d4cstainless-app[bot]1 years ago | 106 | |
| 107 | steps: | |
58184ad5Drew Hintz3 months ago | 108 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
b31f4d4cstainless-app[bot]1 years ago | 109 | |
e507a4ebstainless-app[bot]2 months ago | 110 | - name: Set up Rye |
| 111 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 | |
| 112 | with: | |
| 113 | version: '0.44.0' | |
| 114 | enable-cache: true | |
b31f4d4cstainless-app[bot]1 years ago | 115 | - name: Install dependencies |
| 116 | run: | | |
| 117 | rye sync --all-features | |
| 118 | | |
52b183d5stainless-app[bot]1 years ago | 119 | - env: |
b31f4d4cstainless-app[bot]1 years ago | 120 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| 121 | run: | | |
| 122 | rye run python examples/demo.py | |
52b183d5stainless-app[bot]1 years ago | 123 | - env: |
b31f4d4cstainless-app[bot]1 years ago | 124 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
| 125 | run: | | |
| 126 | rye run python examples/async_demo.py |