Skip to content

ci: add coverage measurement and Codecov upload#17

Merged
jackparnell merged 1 commit intomainfrom
feature/coverage-and-codecov
Apr 9, 2026
Merged

ci: add coverage measurement and Codecov upload#17
jackparnell merged 1 commit intomainfrom
feature/coverage-and-codecov

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

  • Adds pytest-cov to the test job (Python 3.12 only) and uploads coverage.xml via codecov/codecov-action@v5
  • Adds [tool.coverage.run] and [tool.coverage.report] config to pyproject.toml
  • Adds 2 new register-error tests covering the previously-uncovered branches in client.py (non-JSON error body, dict-shaped detail) — SDK is now at 100% line coverage (205/205)
  • Adds CI / Codecov / PyPI / Python versions / license badges to the README

This brings colony-sdk-python in line with what crewai-colony already has. After merge, the Codecov repo will need to be activated (one click in the Codecov dashboard) for the badge to populate.

Test plan

  • pytest --cov=colony_sdk reports 100% locally
  • ruff check and ruff format --check pass
  • CI lint / typecheck / test matrix all green
  • Codecov upload step succeeds on the 3.12 job

Adds coverage measurement to the test job (Python 3.12), uploads to
Codecov via codecov-action@v5, and adds CI/Codecov/PyPI/Python/license
badges to the README.

Two new register-error tests cover the previously-uncovered branches
in client.py (non-JSON error body and dict-shaped detail), bringing
the SDK to 100% line coverage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jackparnell jackparnell merged commit 58f1243 into main Apr 9, 2026
6 checks passed
ColonistOne added a commit that referenced this pull request Apr 9, 2026
Two changes that ship together so v1.5.0 can be the first release cut
via the new automation:

1. Release workflow at .github/workflows/release.yml — triggered on
   `v*` tag push. Stages:
     - test:           runs ruff, mypy, pytest before anything else
     - build:          builds wheel + sdist, refuses to proceed if
                       the tag version doesn't match pyproject.toml
     - publish:        uploads to PyPI via OIDC trusted publishing
                       (no API token stored anywhere — short-lived
                       token minted by PyPI from the GitHub Actions
                       OIDC identity at publish time)
     - github-release: extracts the matching CHANGELOG section and
                       creates a GitHub Release with the wheel + sdist
                       attached

2. Version bump 1.4.0 → 1.5.0 in pyproject.toml and __init__.py.

3. CHANGELOG: consolidated the 1.5.0 section into a clean, ordered
   summary covering everything that's landed since 1.4.0:
     - AsyncColonyClient (PR #18)
     - Typed error hierarchy (PR #19)
     - RetryConfig + 5xx default retry (PR #20)
     - py.typed + verify_webhook + Dependabot (PR #21)
     - Pagination iterators (PR #23)
     - Coverage + Codecov (PR #17)
     - This release automation

Coverage at 100% (514/514 statements). 215 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ColonistOne added a commit that referenced this pull request Apr 9, 2026
Two changes that ship together so v1.5.0 can be the first release cut
via the new automation:

1. Release workflow at .github/workflows/release.yml — triggered on
   `v*` tag push. Stages:
     - test:           runs ruff, mypy, pytest before anything else
     - build:          builds wheel + sdist, refuses to proceed if
                       the tag version doesn't match pyproject.toml
     - publish:        uploads to PyPI via OIDC trusted publishing
                       (no API token stored anywhere — short-lived
                       token minted by PyPI from the GitHub Actions
                       OIDC identity at publish time)
     - github-release: extracts the matching CHANGELOG section and
                       creates a GitHub Release with the wheel + sdist
                       attached

2. Version bump 1.4.0 → 1.5.0 in pyproject.toml and __init__.py.

3. CHANGELOG: consolidated the 1.5.0 section into a clean, ordered
   summary covering everything that's landed since 1.4.0:
     - AsyncColonyClient (PR #18)
     - Typed error hierarchy (PR #19)
     - RetryConfig + 5xx default retry (PR #20)
     - py.typed + verify_webhook + Dependabot (PR #21)
     - Pagination iterators (PR #23)
     - Coverage + Codecov (PR #17)
     - This release automation

Coverage at 100% (514/514 statements). 215 tests passing.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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