Skip to content

Add Python CI matrix + coverage and release-based PyPI publish workflow#16

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/add-cd-auto-publish-pypi
Closed

Add Python CI matrix + coverage and release-based PyPI publish workflow#16
Copilot wants to merge 3 commits intomainfrom
copilot/add-cd-auto-publish-pypi

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

This PR adds the missing GitHub automation needed for PyPI publishing readiness: continuous integration with linting/tests across multiple Python versions and continuous delivery for release-triggered PyPI publishing. It also wires README status visibility and aligns coverage collection with the Python package path.

  • CI workflow (.github/workflows/ci.yml)

    • Adds a Python version matrix: 3.9, 3.10, 3.11
    • Adds code-quality linting via ruff
    • Adds automated test execution with coverage via pytest-cov and pytest --cov=genetic_algorithm
    • Sets explicit minimal workflow permissions (contents: read)
  • CD workflow for PyPI (.github/workflows/publish.yml)

    • Adds release-driven publish flow (on: release: published)
    • Builds distributions with python -m build
    • Publishes to PyPI using pypa/gh-action-pypi-publish with OIDC (id-token: write)
  • Python package coverage target alignment

    • Adds lightweight genetic_algorithm package alias (genetic_algorithm/__init__.py) that re-exports from compiled ga module
    • Updates pyproject.toml to include wheel.packages = ["genetic_algorithm"] so coverage target exists in installed package layout
  • README status badge

    • Adds CI badge for actions/workflows/ci.yml
  • Focused Python compatibility test

    • Adds tests/test_python_package.py to verify genetic_algorithm import surface is exposed (e.g., Config, Result)

Example of the new CI matrix + coverage step:

strategy:
  matrix:
    python-version: ["3.9", "3.10", "3.11"]

- name: Run Python tests with coverage
  run: pytest --cov=genetic_algorithm

⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Add continuous deployment for PyPI publishing Add Python CI matrix + coverage and release-based PyPI publish workflow Mar 28, 2026
Copilot AI requested a review from Rahuldrabit March 28, 2026 13:46
@Rahuldrabit Rahuldrabit deleted the copilot/add-cd-auto-publish-pypi branch March 28, 2026 13:56
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