Repository navigation
ci(unit-tests): run platform-independent project pins once per push (#1954) - #1956
Conversation
…1954) - tests/_tiers.py: is_project_pin() and project_pin_paths(), the one rule. A tests/project module is a pin unless its AST, or that of the repository code it runs, imports pcapkit or compares the interpreter version. - unit-tests.yml: project-tests runs the pins under pytest on every pull request and push, but not under gate-only, and required-checks needs it; every test and test-ktlo leg ignores them. The docs-only steps stay. - experimental.yml: lists the pins on the runner's python3 and ignores them. - tests/_dependency_gates.py: models project-tests as its own selection. - Tier-guard tests run the steps against the rule; the 1732, queue, 1938 and 1672 tests, the workflows page and its citations follow the new layout. Closes #1954
|
GOOD TO GO at
I checked the ruleset: its required contexts are |
|
The red |
|
#1957's fix is on |
|
Coverage: 90.07% (unit tier, Python 3.15,
Per-file detail: the |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
Option 3 on #1954. The
tests/projectmodules whose result does not depend on the interpreter ("project pins") now run once per push inproject-tests, instead of on every matrix leg.tests/_tiers.pyis_project_pin()is the one source of truth. A module counts as a pin unless it, or repository code it runs, importspcapkitor branches on the interpreter version. The check is conservative and AST-based.project-testsruns the pins under pytest on every PR and every push tomain, but not undergate-only.required-checksnow requires it on every diff. The docs-only steps are unchanged.test/test-ktloleg and everyexperimental.ymlleg ignores the pins. Both workflows askproject_pin_paths()at run time, so no file keeps a list of pins.gatekeeps the full suite, and theunittest-orderingproject cell keeps the pins.workflows.rstgains a "Project Pins" section.Locally the two halves partition
tests/projectwith nothing lost or duplicated. The new and changed pins fail onmain. Estimated saving: about 8–9 runner-minutes per code push, and about 3 minutes off the longest leg.Closes #1954