feat: add reusable python-ci workflow#174
Merged
Merged
Conversation
Add a reusable Python CI workflow (lint / type-check / pytest with Codecov coverage upload) matrixed over OS and Python version. This is the test/lint counterpart to the security-only python-audit.yml and mirrors php-ci.yml conventions: pinned action SHAs, harden-runner, read-only permissions, persist-credentials: false, explicit secrets, and caller commands routed through env + bash -c. Lets org Python repos drop inline codecov-action references (bumped per-repo by Renovate) in favour of a single centrally-pinned copy. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Pull request overview
Adds a new reusable GitHub Actions workflow (python-ci.yml) to centralize Python linting, type-checking, testing, and optional coverage uploads for org repositories, following the same “reusable CI workflow” approach already used for PHP.
Changes:
- Introduces
.github/workflows/python-ci.ymlas aworkflow_callreusable workflow with OS/Python version matrices. - Provides caller-configurable install/lint/type-check/test commands executed via environment variables.
- Adds optional, single-cell-gated coverage upload to Codecov and/or upload as a workflow artifact.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Mirror php-ci.yml: a caller that enables coverage upload while disabling lint/type-check/tests would otherwise have the whole job skipped, making the upload a silent no-op. Addresses Copilot review on #174. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|
CybotTM
added a commit
to netresearch/coding_agent_cli_toolset
that referenced
this pull request
Jun 7, 2026
## What Replaces the inline `Test Suite` job with the org-standard `netresearch/.github/.github/workflows/python-ci.yml@main` reusable (added in netresearch/.github#174). It runs the unit + integration pytest suites with coverage and uploads to Codecov. `lint`, `security`, `build`, `docs`, and `integration-e2e` are unchanged. The reusable caller keeps the job name `test`, so the `needs: [lint, test]` / `needs: [test]` dependencies stay valid. ## Why Renovate was bumping `codecov/codecov-action` in this repo per release (#88). The action now lives once in `python-ci.yml` and is pinned/bumped centrally — the same model PHP repos use via `php-ci.yml`. There is no longer an inline `codecov-action` reference here. Closes #88. ## Behavior notes - Test execution still runs across `ubuntu-latest`, `macos-latest`, `windows-latest` on Python 3.14. - Coverage now uploads **once** (ubuntu / 3.14) instead of from all three OS cells — the previous setup uploaded three reports with different `name=` values. - Install still uses `pip install -r requirements-dev.txt` (matching the previous job; not switched to uv). ## Residual The `lint`, `security`, `build`, `docs`, `integration-e2e` jobs still pin `actions/checkout` / `actions/setup-python`, which Renovate will still bump occasionally. This PR stops the **codecov** churn specifically. ## Validation `yamllint` (org config) and `actionlint` clean.
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.



What
Adds
.github/workflows/python-ci.yml— a reusable Python CI workflow (lint / type-check / pytest with Codecov coverage upload), matrixed over OS and Python version.This is the test/lint counterpart to the existing security-only
python-audit.yml. A repo typically calls both:python-ci.ymlfor lint/type/test/coverage andpython-audit.ymlfor the security scan.Why
Org Python repos currently inline
codecov/codecov-action(and the rest of their CI) in each repo'sci.yml, so Renovate bumps the action per repo (e.g.coding_agent_cli_toolset#88). Centralising the action here means it is pinned and bumped once, the same wayphp-ci.ymlalready centralises it for PHP repos.Design
Mirrors
php-ci.ymlconventions exactly:step-security/harden-runner, read-onlypermissions,persist-credentials: false.CODECOV_TOKEN), neversecrets: inherit.install-cmd,lint-cmd,type-check-cmd,test-cmd) routed throughenv:and run viabash -c "$VAR"— no caller text in argument position, no untrustedgithub.event.*inrun:.codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f(v7.0.0, current latest).coverage-os+coverage-python-version) to avoid duplicate uploads.Validation
Locally clean against the repo's actual CI tooling:
yamllint(orglint-yaml.ymlconfig) — cleanactionlint— cleanzizmor— no findingsFollow-up
coding_agent_cli_toolsetwill migrate its inlineci.ymllint/test/coverage to call this@main, dropping its inlinecodecov-action.