CI: on demand only, one job on Python 3.12 (run it with the ci label) - #97
Merged
Merged
Conversation
Six jobs (lint, tests on 3.11/3.12/3.13, conformance, build), each with its own checkout, Python setup and install, on every push and pull request, become one manually dispatched job on the Python releases are built with: one install of the dev extra, ruff, one pytest run that includes the specification fixtures corpus (a sparse checkout of fixtures only, switchable off with the 'conformance' input), and the build with twine check. A 10-minute timeout caps a runaway run. README, CONFORMANCE.md and PUBLISHING.md say CI is on demand. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013WmBAc5T7UCKVdpUmg9qxz
Adding the label runs CI, and it runs again on each push to that pull request until the label is removed; other labels and unlabeled pull requests run nothing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013WmBAc5T7UCKVdpUmg9qxz
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.
Summary
Saves Actions minutes. CI no longer runs on every push to
mainand every pull request as six jobs; it runs on demand, as one job.Before: lint, tests on Python 3.11 / 3.12 / 3.13, specification conformance and build, as six jobs on every push and PR. Each paid for its own checkout, Python setup and
pip install, and billing rounds each job up to a minute.Now (
.github/workflows/ci.yml):cilabel on a pull request (adding it runs CI; it then runs again on each push to that PR until the label is removed; other labels, and PRs without the label, run nothing and the job is skipped at no cost).pip install -e ".[dev]"already holds pytest, ruff, build and twine.LEGALDOWN_FIXTURES_DIR), instead of a secondpytest tests/conformance. The spec is checked out as a sparse checkout offixtures/only. Aconformanceinput (default on) switches the corpus off for a quicker manual run.twine check --strictstay, so a packaging problem still shows before a release.timeout-minutes: 10caps a runaway run; in-progress runs on the same ref are still cancelled.Run locally from a fresh 3.12 venv, the same steps take 23 s including the install (lint, 2413 tests with the corpus, build,
twine check).publish.yml(release / manual only, already 3.12) andclaude.yml(@claudementions only) are unchanged. README, CONFORMANCE.md and.github/PUBLISHING.mdnow say CI is on demand; the release steps tell you to run it on the release commit.Things to know
cilabel is added, so run it before merging. Ifmainis ever protected with required status checks, an on-demand workflow cannot satisfy them.cilabel, so its own CI run is the first real run of the new workflow.Test plan
cilabel is green🤖 Generated with Claude Code
https://claude.ai/code/session_013WmBAc5T7UCKVdpUmg9qxz
Generated by Claude Code