Skip to content

ci: route shell tests through the shared python-ci reusable#123

Merged
CybotTM merged 1 commit into
mainfrom
ci/use-shared-reusables
Jul 22, 2026
Merged

ci: route shell tests through the shared python-ci reusable#123
CybotTM merged 1 commit into
mainfrom
ci/use-shared-reusables

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

ci.yml now contains zero step-level action uses — every job is a call to a shared reusable workflow in netresearch/.github. The only job left with inline steps was shell-tests (actions/checkout + a run: block); it now calls python-ci.yml, whose test step executes the caller-supplied command with bash -c from the repo root.

app-ci, docs and integration-e2e were already reusable calls and are untouched.

Behaviour comparison — shell-tests

Behaviour Before (inline job) After (python-ci.yml@main) Verdict
Runner runs-on: ubuntu-latest os-versions default '["ubuntu-latest"]' identical
Checkout actions/checkout@3d3c42e (v7) actions/checkout@3d3c42e (v7), same SHA, plus persist-credentials: false identical + hardened (the suites use no git credentials)
Commands bash tests/test_guide_multi_install.sh then bash tests/test_reconcile_dryrun.sh in one `run: ` block test-cmd: bash tests/test_guide_multi_install.sh && bash tests/test_reconcile_dryrun.sh
Working directory repo root working-directory default . identical
Shell bash -e defaults.run.shell: bash, command run via bash -c identical
Lint / type-check none run-lint: false, run-type-check: false identical (nothing added)
Python interpreter runner system python3 (3.12 on ubuntu-24.04) actions/setup-python 3.14 + pip install -e . see delta 1
Job permissions inherited workflow default contents: read job-level contents: read, reusable job declares contents: read identical effective token
Job timeout none (6 h platform default) timeout-minutes default 15 see delta 2
Artefacts / coverage none upload-coverage-* default false identical
Job gate (if:) none reusable skips only when every feature is off; run-tests: true keeps it running identical

python-ci.yml's workflow_call inputs, secrets, per-job permissions (contents: read) and steps were read from source on main before mapping. No input needed by this job is missing, and nothing the old job did is dropped.

Accepted, intentional deltas

  1. Python 3.14 + editable install instead of the runner's system Python. test_reconcile_dryrun.sh runs python3 audit.py --help and greps the output. cli_audit imports packaging and PyYAML, which happened to be present in the runner's system interpreter; a setup-python interpreter is clean, so the caller installs the project explicitly. 3.14 is used because pyproject.toml declares requires-python = ">=3.14" (and the rest of this workflow already tests 3.14). This makes the environment deterministic rather than dependent on runner image contents — strictly stronger than before.
  2. 15-minute job timeout (reusable default) where the job previously had none. The job completes in well under a minute (verified in run 29914321738).
  3. Added hardening from the reusable: step-security/harden-runner (egress-policy audit) and persist-credentials: false on checkout.
  4. Workflow-level permissions: {} replaces contents: read. Every job in this file declares its own permissions: block, so the effective token per job is unchanged; this matches the caller pattern already used in dependency-review.yml and auto-merge-deps.yml.
  5. Check name changes from Shell Tests to Shell Tests / Python 3.14 (ubuntu-latest). main has no required status checks configured, so no branch-protection update is needed.

Deliberately NOT migrated

  • release.yml — out of scope for this PR. Migrating it needs extensions to python-release.yml that do not exist yet; migrating it now would drop behaviour.
  • dependency-review.yml, auto-merge-deps.yml — already pure reusable callers with no step-level actions.

Validation

  • actionlint .github/workflows/ci.yml — clean.
  • grep "uses:" .github/workflows/ci.yml returns only the four netresearch/.github/.github/workflows/*.yml@main reusable calls; no step-level uses: remains.

The shell-tests job was the last one in ci.yml with step-level action uses
(actions/checkout + an inline run block). It now calls
netresearch/.github python-ci.yml, so every job in ci.yml is a reusable
workflow call and actions live only inside reusables.

The two bash suites run via python-ci's test step; test_reconcile_dryrun.sh
drives `python3 audit.py`, so the caller installs the project (packaging,
PyYAML) on Python 3.14 instead of relying on the runner's system
interpreter.

Workflow-level permissions are now empty, with the grant declared on each
calling job.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Copilot AI review requested due to automatic review settings July 22, 2026 12:02
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

  • .github/workflows/ci.yml

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit 89208d3 into main Jul 22, 2026
24 of 25 checks passed
@CybotTM
CybotTM deleted the ci/use-shared-reusables branch July 22, 2026 18:09
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