chore: add github worfklow to publish sdk on pypy - #32
Open
pdeburen wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Reworks the existing GitHub Actions pipeline into a CI/CD workflow that runs tests across multiple Python versions, builds distribution artifacts, and adds a tag-triggered publish job that uploads the package to PyPI via Trusted Publishing. Also bumps the mypy target Python version and tightens the user-agent test regex.
Changes:
- Restructure
.github/workflows/build.ymlintotest(3.8/3.9/3.10 matrix),quality,package,docs, andpublishjobs, with PyPI Trusted Publishing onv*tag pushes. - Bump
mypy.inipython_versionfrom 3.8 to 3.10. - Make the
user-agentregex anchored and tolerant of multi-digit version components.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/build.yml | Replaces the lint/build-docs pipeline with a multi-job CI/CD workflow including a tag-gated PyPI publish job. |
| mypy.ini | Raises python_version to 3.10 while the project still supports 3.8+. |
| tests/test_helpers.py | Anchors the user-agent regex and allows multi-digit version segments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [mypy] | ||
|
|
||
| python_version = 3.8 | ||
| python_version = 3.10 |
| on: push | ||
| on: | ||
| pull_request: | ||
| push: |
Comment on lines
+135
to
+155
| publish: | ||
| name: Publish to PyPI | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - package | ||
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/caplena | ||
| steps: | ||
| - name: Download distribution artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
|
|
||
| - name: Publish package | ||
| uses: pypa/gh-action-pypi-publish@release/v1 |
| python -m pip install -e ".[test]" | ||
|
|
||
| - name: Run tests | ||
| run: pytest -q --ignore=tests/controllers |
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.