From 5c06b57cea3f575615af1b2042f080ae188b7432 Mon Sep 17 00:00:00 2001 From: Christine Chen <10511452+christineschen@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:31:33 -0400 Subject: [PATCH] feat: add PR validation workflow The Python SDK had no pull_request-triggered checks, so regen PRs (speakeasy-sdk-regen-*) carried an empty status-check rollup and the auto-merge flow would merge them with zero validation. The TypeScript SDK validates every regen PR via pr-validation.yaml; Python had no equivalent. Add a single-file PR Validation workflow that builds the package and runs the SDK's existing quality gates (mypy, pyright, pylint) via uv. No tests exist in this repo yet, so no API-key secret is needed, which also lets the workflow run on fork PRs. paths-ignore on .speakeasy/in.openapi.yaml mirrors TS so pure spec-bump PRs don't double-trigger. This registers a `validate` check that the auto-merge wait_for_checks step will gate on once both land. --- .github/workflows/pr-validation.yaml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pr-validation.yaml diff --git a/.github/workflows/pr-validation.yaml b/.github/workflows/pr-validation.yaml new file mode 100644 index 0000000..741f8d6 --- /dev/null +++ b/.github/workflows/pr-validation.yaml @@ -0,0 +1,37 @@ +name: PR Validation + +on: + pull_request: + paths-ignore: + - .speakeasy/in.openapi.yaml + +concurrency: + group: pr-validation-${{ github.event.pull_request.number }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + - name: Build SDK + run: uv build + + - name: Type check (mypy) + run: uv run --group dev mypy src + + - name: Type check (pyright) + run: uv run --group dev pyright src + + - name: Lint (pylint) + run: uv run --group dev pylint src --rcfile pylintrc