Root cause of PR checks stuck "Waiting to run": full-pytest on main ran ~12k tests including the slow registry on a 1.5-CPU / 1.2 GiB job cgroup for hours, monopolizing the only runner. Workflows: - full-pytest.yml: fast lane only (`not quarantine and not slow`) - nightly-full-pytest.yml: full suite including slow (schedule + manual) - lane-shas.yml: PR path filters so pin verification is skipped when the change cannot affect lane report bytes Docs: docs/ci-optimization.md + testing-lanes CI mapping. Infra (VM, same change window): job cgroup 2 CPU / 1800 MiB; hung full-pytest task stopped so the queue can drain PR smoke/lane-shas.
74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
name: full-pytest
|
||
|
||
# Post-merge gate — runs the **fast** lane on every push to main.
|
||
#
|
||
# Why not full+slow here:
|
||
# Host is a 2‑vCPU / ~4 GiB VM shared with Forgejo + Postgres + Traefik.
|
||
# Job containers were capped at 1.5 CPU / 1.2 GiB. Running the entire
|
||
# ~12k-test suite including the slow registry (one 16 min fixture floor)
|
||
# monopolized the single Act runner for hours and starved PR smoke /
|
||
# lane-shas ("Waiting to run").
|
||
#
|
||
# Coverage contract:
|
||
# - This workflow: ``not quarantine and not slow`` (make test-fast).
|
||
# - Slow/soak/proof matrix: ``nightly-full-pytest.yml`` (schedule + manual).
|
||
# - PR gate remains smoke.yml (minutes) + path-filtered lane-shas.yml.
|
||
#
|
||
# See docs/testing-lanes.md and docs/ci-optimization.md.
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
concurrency:
|
||
group: full-pytest-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
pytest:
|
||
name: full pytest (fast lane, not quarantine and not slow)
|
||
runs-on: ubuntu-latest
|
||
# Fast lane should finish well under this on a healthy runner.
|
||
timeout-minutes: 30
|
||
|
||
steps:
|
||
- name: checkout
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 1
|
||
|
||
- name: set up uv
|
||
uses: astral-sh/setup-uv@v5
|
||
with:
|
||
python-version: '3.12.13'
|
||
enable-cache: true
|
||
|
||
- name: install dependencies
|
||
run: |
|
||
uv pip install -e ".[dev]" pyyaml
|
||
|
||
- name: pytest fast lane (parallel)
|
||
env:
|
||
PYTHONPATH: ${{ github.workspace }}
|
||
CORE_SHOWCASE_SKIP_BUDGET: "1"
|
||
# Avoid uv hardlink warning noise across filesystems on Act.
|
||
UV_LINK_MODE: copy
|
||
run: |
|
||
# -n 2 matches prior CI; host is 2 vCPU — do not raise without more cores.
|
||
uv run pytest -m "not quarantine and not slow" -n 2 --tb=short -q --maxfail=10
|
||
|
||
- name: report quarantine + slow registry size (informational)
|
||
if: always()
|
||
env:
|
||
PYTHONPATH: ${{ github.workspace }}
|
||
run: |
|
||
uv run python -c "
|
||
import sys
|
||
sys.path.insert(0, '.')
|
||
from conftest import QUARANTINE, SLOW_FILES, SLOW_TESTS
|
||
print(f'::notice title=Quarantine size::{len(QUARANTINE)} tests quarantined.')
|
||
print(f'::notice title=Slow registry::{len(SLOW_FILES)} files + {len(SLOW_TESTS)} exact tests classified slow (nightly only).')
|
||
"
|