Skip to content

Add Python SDK CI workflow#4

Merged
gregnazario merged 5 commits into
mainfrom
add-ci
Apr 6, 2026
Merged

Add Python SDK CI workflow#4
gregnazario merged 5 commits into
mainfrom
add-ci

Conversation

@gregnazario
Copy link
Copy Markdown
Collaborator

Summary

  • Add CI workflow that runs on PRs and pushes to main
  • Lint (ruff check), format (ruff format), type-check (pyright), test (pytest), and build (uv build) across Python 3.11, 3.12, 3.13

Test plan

  • Verify CI runs on this PR
  • Confirm all matrix jobs pass

Copilot AI review requested due to automatic review settings April 6, 2026 03:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions CI workflow for the Python SDK to validate code quality and packaging on PRs and pushes to main.

Changes:

  • Introduces a CI workflow triggered on pull_request and push to main.
  • Runs linting (ruff), formatting check (ruff format), type checking (pyright), tests (pytest), and package build (uv build).
  • Executes the pipeline across a Python version matrix (3.11, 3.12, 3.13).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/python-sdk-ci.yml
Add pytest-cov to dev dependencies and run pytest with --cov flags
to generate coverage reports in CI.
Copilot AI review requested due to automatic review settings April 6, 2026 03:29
@gregnazario gregnazario enabled auto-merge (rebase) April 6, 2026 03:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to +22
- uses: astral-sh/setup-uv@v8.0.0
- run: uv python install ${{ matrix.python-version }}
- run: uv sync
- run: uv run ruff check .
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job installs a matrix Python version, but uv sync/uv run may still end up using the project’s pinned interpreter (there’s a .python-version file set to 3.11) unless the interpreter is explicitly selected. To ensure the matrix is actually exercised, set UV_PYTHON=${{ matrix.python-version }} for the job/steps or run uv run --python ... / uv python pin before syncing/running tools.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/python-sdk-ci.yml Outdated
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.0.0
- run: uv python install ${{ matrix.python-version }}
- run: uv sync
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CI reproducibility, consider running uv sync in a mode that fails if the lockfile is out of date (e.g., --frozen / --locked, depending on your intended behavior). Without this, CI can silently resolve to different dependency versions than what’s committed in uv.lock.

Suggested change
- run: uv sync
- run: uv sync --frozen

Copilot uses AI. Check for mistakes.
- Set UV_PYTHON to ensure the matrix Python version is used instead of
  the .python-version pin
- Use --frozen to fail CI if the lockfile is out of date
@gregnazario gregnazario merged commit e8906be into main Apr 6, 2026
3 checks passed
@gregnazario gregnazario deleted the add-ci branch April 6, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants