Skip to content

feat: [DEV-16400] move CI and PyPI publishing from Harness to GitHub Actions with OIDC trusted publishing - #462

Merged
inkmugs merged 4 commits into
masterfrom
feat/dev-16400
Nov 23, 2026
Merged

inkmugs merged 4 commits into
masterfrom
feat/dev-16400

Conversation

@inkmugs

@inkmugs inkmugs commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • move CI and PyPI publishing from Harness to GitHub Actions with OIDC trusted publishing

Jira

  • Ticket: DEV-16400
  • Update the Jira ticket before review if investigation changed scope, risks, dependencies, or verification steps.

Changelog Summary

  • Add a GitHub Actions CI workflow: ruff format check, then mypy and unit tests on Python 3.9 to 3.13 through tox.
  • Add a tag-triggered release workflow that publishes indico-client to PyPI through OIDC trusted publishing. No PyPI token is stored.
  • Remove the Harness pipeline files, scripts/deploy.sh, scripts/test.sh and the deploy extra (twine).
  • Replace the black pre-commit hook with ruff format, matching the CI lint job.

Contract Changes

  • None. No SDK code, API or packaging metadata changes apart from removing the unused deploy extra.

Backward Compatibility / Breaking Changes

  • No SDK behavior change. Release process changes: publishing now happens from GitHub Actions on a version tag push, a wheel is published alongside the sdist, and the deploy extra is gone. Before merge: disable the Harness triggers for this repo. Before the first release: create a protected pypi environment (required reviewers, tag-only deployment rule [0-9].[0-9].[0-9]*), add a tag ruleset for version tags, then register the PyPI trusted publisher (owner IndicoDataSolutions, repository indico-client-python, workflow release.yml, environment pypi). Revoke the old PyPI token after the first OIDC release. Snyk scans and Harbor image builds from Harness are not carried over.

Tests and Verification Added

  • No new tests: the change is CI configuration. tox.ini now sets a dummy INDICO_API_TOKEN so the unit tests no longer depend on a token file written by the deleted scripts/test.sh.

Net New Behaviors Requiring Integration Tests

  • None. First real proof of the publish path is a prerelease tag after the PyPI publisher is registered.

Validation

  • actionlint clean on both workflows; ruff 0.17.6 format check passes; tox py39 to py313 all pass (147 tests each); uv lock --check passes; version check run against real local tags in a scratch clone (7.10.1 and 6.8.1-alpha1 pass, a commit past the tag and a 0.0.0 build fail). Not yet run on GitHub runners.

Note

Medium Risk
Release and publish paths change (tag-driven OIDC publish, approval gate); first tag release may fail until org Actions policy allows pypa/gh-action-pypi-publish and PyPI trusted publisher setup is complete.

Overview
Replaces Harness with GitHub Actions for linting, multi-version tests, and PyPI releases. New .github/workflows/ci.yml runs ruff format checks and tox on Python 3.9–3.13 for PRs, master pushes, and as a reusable workflow. .github/workflows/release.yml runs on version tags: CI → uv build → verifies the wheel version matches the tag → publishes via OIDC trusted publishing to the protected pypi environment (deployment approval required).

The Harness pipeline YAML under .harness/ is removed, along with scripts/deploy.sh and scripts/test.sh. Publishing no longer uses the deploy extra (twine); lockfile entries for those deps are dropped. scripts/release.sh tags and pushes releases with validation (version shape, duplicate tags, post-release rules, etc.), and README documents the new release and approval flow.

Formatting toolchain: pre-commit switches from black to ruff format (aligned with CI). tox.ini sets a dummy INDICO_API_TOKEN so unit tests don’t rely on the deleted Harness test script. One integration test assertion is reformatted for ruff.

Reviewed by Cursor Bugbot for commit 2f26796. Bugbot is set up for automated code reviews on this repo. Configure here.

Open blocker for the release workflow

  • The org Actions policy rejects third-party actions. The first CI run failed at startup with astral-sh/setup-uv; it passes with the org fork IndicoDataSolutions/setup-uv at the same commit.
  • release.yml still uses pypa/gh-action-pypi-publish, which has no org fork. An org admin needs to fork it into IndicoDataSolutions or allow it in the Actions policy before a tag release can start. CI on pull requests is not affected.

@inkmugs
inkmugs marked this pull request as ready for review November 23, 2026 20:02

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fdbc13d. Configure here.

Comment thread .github/workflows/ci.yml
version: "0.13.9"
require-checksums: true
python-version: ${{ matrix.python-version }}
- run: uvx --with tox-uv tox -e ${{ matrix.tox-env }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CI forces old tox on 3.9

Medium Severity

setup-uv sets UV_PYTHON to the matrix interpreter, and uvx --with tox-uv tox runs against that interpreter. Current tox-uv (and recent tox) require Python 3.11+, so the py39 and py310 jobs can fail to resolve or pull arbitrarily old tool versions. That is not the same as the local tox py39–py313 run described in the PR, and those matrix legs were not proven on GitHub runners.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fdbc13d. Configure here.

@inkmugs
inkmugs merged commit f9ffbd9 into master Nov 23, 2026
11 checks passed
@inkmugs
inkmugs deleted the feat/dev-16400 branch November 23, 2026 20:58
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