Skip to content

Conversation

@raman325
Copy link
Owner

@raman325 raman325 commented Jan 15, 2026

Proposed change

Modernize and consolidate CI workflows for better organization and faster execution.

Integration workflow (integration.yaml)

Consolidates Python testing with Home Assistant validation into three parallel jobs:

  • Test - pytest with coverage (uses uv for fast dependency installation)
  • HACS - HACS validation
  • Hassfest - Home Assistant manifest validation

Frontend workflow (frontend.yaml)

Consolidates TypeScript CI into two parallel jobs:

  • Lint and Build - eslint and rollup build
  • Test - vitest with coverage

Repository workflow (repository.yaml)

Consolidates repository automation into two jobs:

  • Update Release Draft - drafts release notes from merged PRs
  • Auto Merge - auto-merges dependabot/pre-commit-ci PRs

Removed workflows

  • pytest.yaml → merged into integration.yaml
  • hacs.yaml → merged into integration.yaml
  • hassfest.yaml → merged into integration.yaml
  • vitest.yaml → merged into frontend.yaml
  • yarn.yaml → merged into frontend.yaml
  • release-drafter.yaml → merged into repository.yaml
  • auto-merge.yaml → merged into repository.yaml

Other changes

  • Use uv instead of pip for faster Python dependency installation
  • Add [project] section to pyproject.toml with requires-python = ">=3.13"
  • Add uv.lock to .gitignore
  • Add self-referencing workflow paths so workflow file changes trigger CI
  • Use ruff-check hook ID instead of legacy ruff alias in pre-commit

GitHub UI organization

Workflows now grouped logically:

  • Integration: Test, HACS, Hassfest
  • Frontend: Lint and Build, Test
  • Repository: Update Release Draft, Auto Merge

Benefits

  • Faster Python CI: uv is significantly faster than pip
  • Better organization: Related jobs grouped under same workflow heading
  • Parallel execution: All jobs within a workflow run concurrently
  • Fewer workflow files: 3 workflows instead of 7

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings January 15, 2026 02:17
Copy link
Contributor

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 modernizes the pytest CI workflow by replacing pip with uv for Python package management. The change aligns with the project's local development tooling preference (as documented in AGENTS.md) and aims to provide faster dependency installation and better caching.

Changes:

  • Replaced actions/setup-python with astral-sh/setup-uv@v5 action for Python environment setup
  • Migrated all pip install commands to uv pip install --system
  • Updated pytest execution to use uv run --no-project

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

@github-actions github-actions bot added the code-quality Pull requests that improve code quality label Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.21%. Comparing base (010980e) to head (be278d5).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
- Coverage   95.26%   95.21%   -0.05%     
==========================================
  Files          29       29              
  Lines        2384     2384              
  Branches       88       88              
==========================================
- Hits         2271     2270       -1     
- Misses        113      114       +1     
Flag Coverage Δ
python 95.07% <ø> (-0.05%) ⬇️
typescript 96.53% <ø> (ø)

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Replace pip with uv for faster, more reliable dependency installation
- Use astral-sh/setup-uv action with caching enabled
- Use uv python install for Python setup
- Use uv pip install --system for dependencies
- Use uv run for pytest execution

Also add self-referencing workflow paths to triggers so that changes
to workflow files trigger their respective CI runs:
- pytest.yaml
- vitest.yaml
- yarn.yaml

Add [project] section to pyproject.toml with requires-python to fix
uv warning: "No requires-python value found in the workspace"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 15, 2026
pre-commit-ci bot and others added 10 commits January 15, 2026 02:20
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
uv.lock is generated when using uv for project management, but we only
use uv as a pip replacement for faster package installs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Not needed since we only use uv as a pip replacement, not for project management.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
uv pip install --system requires a system Python. Use actions/setup-python
to provide it, then use uv just as a fast pip replacement.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Combine vitest.yaml and yarn.yaml into frontend.yaml with parallel jobs:
  - "Lint and Build" job (from yarn.yaml)
  - "Test" job (from vitest.yaml)
- Rename pytest.yaml to python.yaml with workflow name "Python"
- Standardize job names for consistent GitHub UI grouping:
  - Frontend: "Lint and Build", "Test"
  - Python: "Test"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename python.yaml to integration.yaml
- Move HACS and Hassfest validation into Integration workflow as parallel jobs
- Delete standalone hacs.yaml and hassfest.yaml

Integration workflow now has three parallel jobs:
- Test (pytest)
- HACS
- Hassfest

Note: auto-merge.yaml uses `gh pr checks --required` which automatically
waits for all required checks - no job name references to update.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merge release-drafter.yaml and auto-merge.yaml into a single
repository.yaml workflow for better organization in GitHub UI.
Both jobs retain their original concurrency settings at job level.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added the pre-commit Pull requests that update pre-commit label Jan 15, 2026
@raman325 raman325 changed the title Use uv instead of pip in pytest workflow Modernize and consolidate GitHub workflows Jan 15, 2026
raman325 and others added 4 commits January 14, 2026 21:42
Allows small coverage decreases (up to 1%) without failing CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Distinct names allow proper branch protection configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pre-commit.ci skips yarn hooks due to missing Node.js.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
More explicit naming for the yarn-based lint and build job.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raman325 raman325 merged commit 4db35c4 into main Jan 15, 2026
13 checks passed
@raman325 raman325 deleted the chore/uv-workflows branch January 15, 2026 02:54
@raman325 raman325 added the github-config Changes to .github/ configuration files label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality Pull requests that improve code quality dependencies Pull requests that update a dependency file github-config Changes to .github/ configuration files pre-commit Pull requests that update pre-commit python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants