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).') "