fix(subscriptions): validate seat bounds on seat→seat product switche… #6140
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: SDK | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| types: [opened, synchronize, edited] | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| name: "Detect changes" | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| sdk: ${{ steps.filter.outputs.sdk }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - uses: dorny/paths-filter@v4.0.3 | |
| id: filter | |
| with: | |
| filters: | | |
| sdk: | |
| - 'sdk/**' | |
| - '.github/workflows/test_sdk.yaml' | |
| tests: | |
| name: "SDK: Tests" | |
| needs: changes | |
| if: needs.changes.outputs.sdk == 'true' | |
| timeout-minutes: 15 | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| env: | |
| POLAR_EMAIL_RENDERER_BINARY_PATH: "/tmp/email-renderer" | |
| POLAR_PYDANTIC_AI_GATEWAY_API_KEY: "POLAR_PYDANTIC_AI_GATEWAY_API_KEY" | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v7.0.0 | |
| with: | |
| python-version-file: "sdk/generator/pyproject.toml" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7.0.0 | |
| with: | |
| node-version: "24" | |
| - name: Install pnpm | |
| run: npm install --global pnpm@11.13.1 | |
| - name: Install just | |
| uses: extractions/setup-just@v4 | |
| - name: Set up server | |
| working-directory: ./server | |
| run: | | |
| touch /tmp/email-renderer | |
| uv sync --frozen | |
| uv run task generate_dev_jwks | |
| - name: Install generator dependencies | |
| working-directory: ./sdk/generator | |
| run: uv sync --frozen | |
| - name: Lint generator | |
| working-directory: ./sdk/generator | |
| run: just lint-check | |
| - name: Test generator | |
| working-directory: ./sdk/generator | |
| run: just test | |
| - name: Generate and test SDKs | |
| working-directory: ./sdk/generator | |
| run: | | |
| just openapi | |
| just generate-all | |
| - name: Verify bundled Python SDK skill | |
| working-directory: ./sdk/python | |
| run: | | |
| uv build --no-sources | |
| unzip -Z1 dist/*.whl | grep -Fx 'polar/.agents/skills/polar-python-sdk/SKILL.md' | |
| unzip -Z1 dist/*.whl | grep -Fx 'polar/.agents/skills/polar-python-sdk/agents/openai.yaml' | |
| unzip -Z1 dist/*.whl | grep -Fx 'polar/.agents/skills/polar-python-sdk/references/migration-from-v0.md' | |
| unzip -Z1 dist/*.whl | grep -Fx 'polar/.agents/skills/polar-python-sdk/references/usage-events.md' | |
| unzip -Z1 dist/*.whl | grep -Fx 'polar/.agents/skills/polar-python-sdk/references/webhooks.md' | |
| - name: Verify bundled TypeScript SDK skill | |
| working-directory: ./sdk/typescript | |
| run: | | |
| mkdir -p packed | |
| pnpm pack --pack-destination packed | |
| tar -tzf packed/*.tgz | grep -Fx 'package/.agents/skills/polar-typescript-sdk/SKILL.md' | |
| tar -tzf packed/*.tgz | grep -Fx 'package/.agents/skills/polar-typescript-sdk/agents/openai.yaml' | |
| tar -tzf packed/*.tgz | grep -Fx 'package/.agents/skills/polar-typescript-sdk/references/migration-from-v0.md' | |
| tar -tzf packed/*.tgz | grep -Fx 'package/.agents/skills/polar-typescript-sdk/references/usage-events.md' | |
| tar -tzf packed/*.tgz | grep -Fx 'package/.agents/skills/polar-typescript-sdk/references/webhooks.md' |