openai/openai-python
Publicmirrored fromhttps://github.com/openai/openai-pythonAvailable
.github/workflows/ci.yml
43lines · modecode
| 1 | name: CI |
| 2 | on: |
| 3 | push: |
| 4 | branches: |
| 5 | - main |
| 6 | pull_request: |
| 7 | branches: |
| 8 | - main |
| 9 | |
| 10 | jobs: |
| 11 | lint: |
| 12 | name: lint |
| 13 | runs-on: ubuntu-latest |
| 14 | if: github.repository == 'openai/openai-python' |
| 15 | |
| 16 | steps: |
| 17 | - uses: actions/checkout@v4 |
| 18 | |
| 19 | - name: Install Rye |
| 20 | run: | |
| 21 | curl -sSf https://rye-up.com/get | bash |
| 22 | echo "$HOME/.rye/shims" >> $GITHUB_PATH |
| 23 | env: |
| 24 | RYE_VERSION: 0.24.0 |
| 25 | RYE_INSTALL_OPTION: '--yes' |
| 26 | |
| 27 | - name: Install dependencies |
| 28 | run: | |
| 29 | rye sync --all-features |
| 30 | |
| 31 | - name: Run ruff |
| 32 | run: | |
| 33 | rye run check:ruff |
| 34 | |
| 35 | - name: Run type checking |
| 36 | run: | |
| 37 | rye run typecheck |
| 38 | |
| 39 | - name: Ensure importable |
| 40 | run: | |
| 41 | rye run python -c 'import openai' |
| 42 | |
| 43 | |
| 44 | |