Skip to content

refactor: parallelize CI jobs and apply ruff formatting#545

Merged
raman325 merged 5 commits intoFutureTense:betafrom
raman325:refactor/parallel-ci-jobs
Jan 15, 2026
Merged

refactor: parallelize CI jobs and apply ruff formatting#545
raman325 merged 5 commits intoFutureTense:betafrom
raman325:refactor/parallel-ci-jobs

Conversation

@raman325
Copy link
Collaborator

@raman325 raman325 commented Jan 15, 2026

Summary

Refactor CI workflow to run jobs in parallel with faster package installation.

Proposed change

CI Parallelization

Split the workflow into parallel jobs for faster feedback:

  • tests: runs pytest with requirements_test.txt
  • lint: runs ruff format/check with requirements_lint.txt
  • mypy: runs mypy with requirements_lint.txt
  • coverage: uploads coverage after tests complete (depends on tests job)

Performance Improvements

  • Use uv instead of pip for significantly faster package installation
  • Each job installs only the dependencies it needs (no tox overhead)

Code Formatting

  • Applied ruff format to entire codebase (38 files reformatted)
  • Removed deprecated UP038 rule from ruff config (rule was removed from ruff)

Dependency Cleanup

  • Removed tox from requirements and pyproject.toml since CI runs commands directly
  • Added pytest-cov to requirements_test.txt for coverage support

Type of change

  • Code quality improvements to existing code or addition of tests

Additional information

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings January 15, 2026 01:47
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2026

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

Codecov Report

❌ Patch coverage is 74.19355% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.17%. Comparing base (a9a30ef) to head (f6f76e6).
⚠️ Report is 7 commits behind head on beta.

Files with missing lines Patch % Lines
custom_components/keymaster/coordinator.py 65.57% 21 Missing ⚠️
custom_components/keymaster/migrate.py 75.00% 2 Missing ⚠️
custom_components/keymaster/helpers.py 88.88% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             beta     #545      +/-   ##
==========================================
+ Coverage   80.86%   82.17%   +1.31%     
==========================================
  Files          19       21       +2     
  Lines        2341     2491     +150     
==========================================
+ Hits         1893     2047     +154     
+ Misses        448      444       -4     
Flag Coverage Δ
python 82.17% <74.19%> (?)

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the CI workflow to run Python checks (pytest, lint, mypy) in parallel instead of sequentially through tox, improving feedback speed and reducing dependency installation overhead.

Changes:

  • Split single tox job into four parallel jobs: tests, lint, mypy, and coverage
  • Removed tox dependency from CI and install requirements directly from split requirement files
  • Changed lint job to use ruff format --check (appropriate for CI) instead of ruff format
Comments suppressed due to low confidence (2)

.github/workflows/pytest.yaml:32

  • The matrix strategy only includes Python 3.13, but the old tox configuration (in pyproject.toml) also tested against Python 3.14. Consider whether testing against multiple Python versions should be preserved, or if this is an intentional change to reduce CI time.
    strategy:
      matrix:
        python-version:
          - "3.13"

.github/workflows/pytest.yaml:87

  • The coverage job is missing a name attribute. Add a name to maintain consistency with the other jobs (tests, lint, mypy) and improve readability in the GitHub Actions UI.
  coverage:
    runs-on: ubuntu-latest
    needs: tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Split the single tox-based workflow into parallel jobs:
- tests: runs pytest with requirements_test.txt
- lint: runs ruff format/check with requirements_lint.txt
- mypy: runs mypy with requirements_lint.txt
- coverage: uploads coverage after tests complete

Each job installs only the dependencies it needs, and all jobs
run in parallel for faster CI feedback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raman325 raman325 force-pushed the refactor/parallel-ci-jobs branch from 02906ca to 00660d5 Compare January 15, 2026 02:08
raman325 and others added 2 commits January 14, 2026 21:10
Run `ruff format` to fix formatting issues detected by CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This rule has been removed from ruff, so ignoring it is no longer needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raman325 raman325 changed the title refactor: parallelize CI jobs (pytest, lint, mypy) refactor: parallelize CI jobs and apply ruff formatting Jan 15, 2026
raman325 and others added 2 commits January 14, 2026 21:11
Required for --cov and --cov-report flags used in CI workflow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace pip with uv for significantly faster dependency installation.
uv is a fast Python package installer written in Rust.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raman325 raman325 merged commit f5344fc into FutureTense:beta Jan 15, 2026
6 checks passed
@raman325 raman325 deleted the refactor/parallel-ci-jobs branch January 18, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants