-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate to GitHub Actions automated release process #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jensens
wants to merge
14
commits into
master
Choose a base branch
from
migrate-github-actions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
This commit modernizes the CI/CD pipeline to match the mxrepo workflow and implements automated releases via GitHub Actions. Based on refactor-package-layout branch. ## New Workflow Files - Add lint.yml: Automated code quality checks (ruff, isort) - Add typecheck.yml: Type checking with mypy - Add release.yml: Automated PyPI publishing workflow - Publishes to Test PyPI on every master push - Publishes to production PyPI on GitHub releases - Add dependabot.yml: Weekly GitHub Actions dependency updates ## Updated Workflow Files - Update test.yml: - Switch from actions/setup-python to astral-sh/setup-uv@v7 - Add workflow_call and workflow_dispatch triggers - Implement coverage artifact collection and reporting - Add dedicated coverage job with HTML report generation - Update docs.yml: - Switch to astral-sh/setup-uv@v7 for consistency - Update action versions (checkout@v5, setup-node@v4) - Update Node.js version from 16 to 20 - Add workflow_call trigger for reusability ## Build System Updates - Update pyproject.toml: - Add hatch-vcs for automatic versioning from git tags - Add hatch-fancy-pypi-readme for combined readme - Make version and readme dynamic - Add ruff.lint configuration for code quality - Add pytest and coverage configuration - Preserve existing stricter mypy settings - Preserve existing isort "plone" profile - Maintain backward compatibility with zest.releaser config ## Documentation - Add RELEASE.md: Comprehensive release process documentation - Automated GitHub release workflow - PyPI Trusted Publishing setup instructions - Version numbering guidelines - Troubleshooting guide - Migration notes from zest.releaser ## Related - Addresses #3: GitHub Actions for testing with coverage artifacts - Migrates release process from manual zest.releaser to automated GitHub releases - Follows same pattern as https://github.com/mxstack/mxrepo
- Add tests/__init__.py to make tests a proper Python package - Add requires-python = '>=3.10' to pyproject.toml - Fixes import issues when running pytest
- Add noqa: S101 comment for type guard assert in resolver.py - Fix per-file-ignores pattern to match tests/*.py instead of */tests.py - Addresses S101 (assert detection) and E501 (line length) issues
- Add 'if TYPE_CHECKING:' to coverage exclude_lines - TYPE_CHECKING blocks contain type-only imports that never execute at runtime - Fixes coverage failure (99% -> 100%)
- Use 'source venv/bin/activate' instead of 'uv run coverage' - uv run creates ephemeral environment without test dependencies - Use the venv created by make install which has coverage installed
- Add 'parallel = true' to tool.coverage.run in pyproject.toml - Update Makefile COVERAGE_COMMAND to include 'coverage combine' - Fixes artifact upload: now creates .coverage.* files instead of single .coverage - Required for combining coverage from multiple test matrix runs
- Add --keep flag to 'coverage combine' in Makefile - Without --keep, combine deletes .coverage.* files after combining - Test jobs need .coverage.* files to upload as artifacts - Fixes 'No files were found with the provided path' error
- Add 'relative_files = true' to tool.coverage.run - Makes coverage use relative paths instead of absolute paths - Fixes path mismatch when combining coverage from macOS/Windows/Ubuntu - Resolves 'No source for code' error when combining artifacts
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.
Overview
This PR modernizes the CI/CD pipeline to match the mxrepo workflow and implements automated releases via GitHub Actions.
Base branch:
refactor-package-layout(builds on the package refactoring work)Changes
New Workflow Files
Updated Workflow Files
test.yml:
actions/setup-pythontoastral-sh/setup-uv@v7for faster dependency managementworkflow_callandworkflow_dispatchtriggers for reusabilitydocs.yml:
astral-sh/setup-uv@v7for consistencyworkflow_calltrigger for reusabilityBuild System Updates
pyproject.toml:
hatch-vcsfor automatic versioning from git tagshatch-fancy-pypi-readmefor combined readme generationversionandreadmedynamicruff.lintconfiguration for enhanced code quality checkspytest.ini_optionsfor test configurationcoverage.runandcoverage.reportfor coverage settingsmypysettings from refactor-package-layoutisort"plone" profileDocumentation
RELEASE.md (new):
Post-Merge Actions Required
After merging this PR, the following steps are needed:
Configure GitHub Environments:
release-test-pypienvironmentrelease-pypienvironmentSet up PyPI Trusted Publishing:
Test the Workflow:
Related Issues
Testing
Migration Notes
zest.releaserwill be replaced by automated GitHub releases