Sync OpenAI SDK surface with latest Docs spec #762
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| provider-generation: | |
| name: Provider Generation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.24" | |
| - name: Install formatter | |
| run: pip install ruff | |
| - name: Regenerate provider clients | |
| run: | | |
| python3 scripts/generate_providers.py \ | |
| --manifest scripts/services.json \ | |
| --specs scripts/specs \ | |
| --languages python,typescript,go | |
| git diff --exit-code | |
| python-lint: | |
| name: Python Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: python | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[dev]" | |
| - name: Run Ruff linter | |
| run: ruff check . | |
| - name: Run Ruff formatter check | |
| run: ruff format --check . | |
| python-test: | |
| name: Python Test (${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| defaults: | |
| run: | |
| working-directory: python | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ".[test]" | |
| - name: Run tests | |
| run: pytest -v | |
| - name: Run tests with coverage | |
| if: matrix.python-version == '3.12' | |
| run: pytest --cov=acedatacloud --cov-report=xml -v | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: python/coverage.xml | |
| fail_ci_if_error: false | |
| typescript-lint: | |
| name: TypeScript Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: typescript | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: typescript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| python-build: | |
| name: Python Build | |
| runs-on: ubuntu-latest | |
| needs: [python-lint, python-test] | |
| defaults: | |
| run: | |
| working-directory: python | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Build package | |
| run: | | |
| python -m pip install --upgrade pip build | |
| python -m build | |
| typescript-build: | |
| name: TypeScript Build | |
| runs-on: ubuntu-latest | |
| needs: [typescript-lint] | |
| defaults: | |
| run: | |
| working-directory: typescript | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: typescript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| # The jest suite existed but nothing ran it, so TypeScript regressions | |
| # could only be caught by a type error. | |
| - name: Test | |
| run: npm test |