Skip to content

Commit 9933b7d

Browse files
committed
docs: describe the workflow inputs and where versions are controlled
1 parent 758a9ec commit 9933b7d

1 file changed

Lines changed: 62 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,10 @@ Callers pin a full commit SHA with the version in a trailing comment, so Renovat
6262

6363
| Workflow | Purpose | Caller provides |
6464
|---|---|---|
65-
| `ci-test-python` | Run pytest on a Python and OS matrix and upload coverage | `package`, and `checks`, `statuses` and `pull-requests` write |
66-
| `ci-test-conda` | The same for conda-based setups such as AiiDA plugins | `package`, `matrix`, `conda-packages`, and `checks` and `statuses` write |
65+
| `ci-test-python` | Run pytest on a Python and OS matrix, upload coverage, or test at the lowest versions that `pyproject.toml` allows (`lowest-dependencies`) | `package`, and `checks`, `statuses` and `pull-requests` write |
66+
| `ci-test-conda` | The same for conda-based setups such as AiiDA plugins | `package`, `conda-packages`, and `checks` and `statuses` write |
6767
| `ci-docs` | Build Sphinx docs with warnings as errors | Nothing required |
6868
| `ci-pre-commit` | Run all pre-commit hooks | Nothing required |
69-
| `ci-lowest-dependencies` | Test at the lowest versions that `pyproject.toml` allows | Lower bounds written as ranges |
7069
| `ci-conda-build` | Build a conda recipe without uploading it | Nothing required |
7170
| `ci-coveralls-finish` | Close a parallel Coveralls build | Run it after the coverage jobs |
7271
| `release-prepare` | Check the version, update version files through a merged pull request, tag and create the GitHub release | `version`, `contents` and `pull-requests` write, and `AUTO_PR_MERGE` when `version-files` is used. Optional `ZULIP_BOT_EMAIL`, `ZULIP_BOT_API_KEY` and `ZULIP_SITE` announce the release |
@@ -109,14 +108,72 @@ The defaults in the shared workflows are the organisation baseline. Checks that
109108
| Workflow | Default Python | Default OS |
110109
|---|---|---|
111110
| `ci-test-python` | Full supported set | Linux |
112-
| `ci-lowest-dependencies` | Full supported set | Linux |
111+
| `ci-test-conda` | Full supported set | Linux |
113112
| `ci-conda-build` | Full supported set | Linux |
114113
| `ci-docs` | Latest only | Linux |
115114
| `ci-pre-commit` | Latest only | Linux |
116115

117116
**Python versions.** The default set is the three newest stable CPython releases. A package's own `pyproject.toml` is the source of truth, so its matrix should match its `requires-python` and classifiers. A package with a narrower range overrides the default in its workflow. Adding a Python version waits until the package's dependencies support it, and dropping one is a deliberate, reviewed change.
118117

119-
**Operating systems.** The default is Linux only. Add macOS and Windows where a package has platform-specific behaviour, such as native code, numerical libraries or documented platform support. A scheduled workflow can run the wider matrix so pull requests stay quick.
118+
**Operating systems.** The default is Linux only, on `ubuntu-26.04`. Add macOS and Windows where a package has platform-specific behaviour, such as native code, numerical libraries or documented platform support. A scheduled workflow can run the wider matrix so pull requests stay quick.
119+
120+
## Where versions are controlled
121+
122+
| What | Where it lives | How it stays current |
123+
|---|---|---|
124+
| Shared-workflow pins in a package repository | the `uses:` lines of its workflows | the Renovate presets in `renovate/` |
125+
| Python versions and the runner | defaults in the shared workflows | edit them here and release |
126+
| Python dependencies, including AiiDA | the package's own `pyproject.toml` | tested at the newest version in range, and at the lowest with `lowest-dependencies` |
127+
| Programs pip cannot install (GROMACS, PLUMED, AmberTools) | `conda-packages` in the package's `ci.yaml` | the repository |
128+
129+
The runner label is written as a literal `runs-on` in some workflows, which Renovate updates, and in the `os` defaults, which it cannot see. When Renovate proposes a runner update, change the `os` defaults in the same pull request. `grep -rn "ubuntu-" .github` lists every place.
130+
131+
A package repository keeps one `ci.yaml` that runs on pull requests, on pushes to `main` and weekly. Python versions come from the shared defaults, so the file lists no versions. A conda-based package adds `conda-packages` for the programs pip cannot install, and a package that needs an extra matrix axis puts a normal `strategy.matrix` on the calling job:
132+
133+
```yaml
134+
jobs:
135+
unit:
136+
uses: CCPBioSim/.github/.github/workflows/ci-test-conda.yaml@<sha> # X.Y.Z
137+
permissions:
138+
contents: read
139+
checks: write
140+
statuses: write
141+
with:
142+
package: mypackage
143+
conda-packages: someprogram=1.2
144+
coverage: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
145+
all-checks:
146+
needs: [unit]
147+
if: always()
148+
runs-on: ubuntu-26.04
149+
steps:
150+
- env:
151+
RESULTS: ${{ join(needs.*.result, ' ') }}
152+
run: '[[ "${RESULTS}" != *failure* && "${RESULTS}" != *cancelled* ]]'
153+
```
154+
155+
The `all-checks` job is the one check to require in branch protection, so a matrix change never breaks it.
156+
157+
The floors check is its own weekly workflow in each repository, so pull requests stay quick. It calls the same test workflow with `lowest-dependencies: true`, and a narrower `python-versions` such as the oldest and newest supported:
158+
159+
```yaml
160+
# .github/workflows/dependency-floors.yaml in a package repository
161+
on:
162+
schedule:
163+
- cron: "47 8 * * 1"
164+
workflow_dispatch:
165+
jobs:
166+
lowest-dependencies:
167+
uses: CCPBioSim/.github/.github/workflows/ci-test-conda.yaml@<sha> # X.Y.Z
168+
permissions:
169+
contents: read
170+
checks: write
171+
statuses: write
172+
with:
173+
package: mypackage
174+
lowest-dependencies: true
175+
python-versions: '["3.12", "3.14"]'
176+
```
120177

121178
---
122179

0 commit comments

Comments
 (0)