Skip to content

Split quality checks from CI test matrix#4180

Open
KRRT7 wants to merge 5 commits into
Textualize:mainfrom
KRRT7:ci/split-quality-checks
Open

Split quality checks from CI test matrix#4180
KRRT7 wants to merge 5 commits into
Textualize:mainfrom
KRRT7:ci/split-quality-checks

Conversation

@KRRT7

@KRRT7 KRRT7 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Splits OS/Python-independent quality checks out of the full test matrix and replaces Poetry-based dependency setup with uv-based installs.

Before, every matrix entry ran:

  • black --check .
  • mypy -p rich --no-incremental
  • pytest with coverage
  • Codecov upload

After this change:

  • A single Ubuntu 3.11 quality job runs Black, mypy, coverage, and Codecov upload.
  • The OS/Python matrix runs plain pytest tests -v after quality passes.
  • The duplicate Ubuntu 3.11 matrix entry is excluded because the quality job already covers that runtime.
  • CI installs with uv.
  • pyproject.toml now includes PEP-style dependency groups:
    • test for matrix jobs: pytest plus attrs.
    • dev for quality: includes test, plus Black, mypy, pytest-cov, and typing-extensions.
  • The stale steps.cached-poetry-dependencies.outputs.cache-hit condition is removed because there was no cache step defining it.

Why

The previous workflow repeated format checks, type checks, coverage generation, and coverage upload across 17 matrix jobs. Those checks are not OS-specific, and coverage only needs to be uploaded once.

This keeps compatibility coverage across Windows, macOS, Ubuntu, and Python versions, while reducing repeated CI work and replacing Poetry environment setup with uv installs.

Validation

ruby -e 'require "yaml"; YAML.load_file(".github/workflows/pythonpackage.yml"); puts "yaml ok"'
actionlint .github/workflows/pythonpackage.yml
git diff --check
python3 - <<'PY'
import tomllib
with open('pyproject.toml', 'rb') as file:
    tomllib.load(file)
PY

I also tested both uv dependency groups in temporary virtualenvs:

uv pip install -e . --group test
python -m pytest tests/test_pretty.py tests/test_syntax.py -q

uv pip install -e . --group dev
python -m black --check rich/syntax.py
python -m mypy rich/syntax.py --no-incremental

All passed locally.

Expected CI impact

  • Build matrix jobs: 17 -> 16
  • Quality/coverage work: 17 repeated runs -> 1 run
  • Codecov uploads: 17 -> 1
  • Build matrix waits for quality, avoiding matrix spend when formatting/typechecking/coverage fails
  • Matrix installs a smaller test dependency group instead of all dev tooling
  • Replaces Poetry install/setup with uv dependency-group installs

@KRRT7 KRRT7 force-pushed the ci/split-quality-checks branch from b039c86 to 3b3a021 Compare June 29, 2026 16:11
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@9d8f9a3). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4180   +/-   ##
=======================================
  Coverage        ?   94.87%           
=======================================
  Files           ?       96           
  Lines           ?     8384           
  Branches        ?        0           
=======================================
  Hits            ?     7954           
  Misses          ?      430           
  Partials        ?        0           
Flag Coverage Δ
unittests 94.87% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants