UN-4010 [FEAT] Support every API deployment request parameter via a generated transport #67
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: Lint and Test | |
| on: | |
| pull_request: | |
| branches: [main, "feat/**", "fix/**"] | |
| push: | |
| branches: [main] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.6.14" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --dev --all-extras | |
| - name: Create test env | |
| run: cp tests/sample.env tests/.env | |
| - name: Lint (ruff) | |
| run: uv run ruff check src/ | |
| - name: Tests (pytest) | |
| run: uv run pytest tests/ -v | |
| sdk-drift: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.6.14" | |
| enable-cache: true | |
| # The generated tree is committed, so an edit to it reviews like any | |
| # other change and then disappears on the next regeneration. Same for a | |
| # spec change that never had the generator run over it. | |
| - name: Regenerate from the committed spec | |
| run: ./tools/gen_sdk.sh | |
| # `git add -N` first: a diff alone cannot see a file the generator has | |
| # newly created, which is exactly what a spec growing an endpoint does. | |
| - name: Fail if the committed SDK is not what the spec generates | |
| run: | | |
| git add -N -- src/unstract/api_deployments/sdk_docstudio | |
| git diff --exit-code -- src/unstract/api_deployments/sdk_docstudio |