Skip to content

Commit 5ec5742

Browse files
julienldclaude
andauthored
ci: add uv.lock sync validation to CI and pre-commit (#663)
* ci: add uv.lock sync validation to CI and pre-commit Add safeguards to prevent uv.lock from going out of sync with pyproject.toml, which caused the 6.7.1 release to fail twice: - Add `uv lock --check` job to PR pipeline (fast, catches before merge) - Add uv-lock pre-commit hook (catches locally before push) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update uv-pre-commit rev from v0.1.24 to 0.10.7 The previous rev (v0.1.24) used incorrect versioning - uv-pre-commit tags match uv releases without a 'v' prefix. Updated to latest 0.10.7. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df6a705 commit 5ec5742

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ env:
1414
HA_IMAGE_GHCR: "ghcr.io/home-assistant/home-assistant:2026.1.3"
1515

1616
jobs:
17+
lockfile:
18+
name: Check uv.lock
19+
runs-on: ubuntu-latest
20+
container:
21+
image: ghcr.io/astral-sh/uv:0.9.30-python3.13-trixie-slim
22+
timeout-minutes: 2
23+
24+
steps:
25+
- uses: actions/checkout@v6
26+
27+
- name: Verify uv.lock is in sync with pyproject.toml
28+
run: uv lock --check
29+
1730
lint:
1831
name: Ruff Lint
1932
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ repos:
44
hooks:
55
- id: ruff
66
args: [--fix]
7+
- repo: https://github.com/astral-sh/uv-pre-commit
8+
# renovate: datasource=github-releases depName=astral-sh/uv-pre-commit
9+
rev: 0.10.7
10+
hooks:
11+
- id: uv-lock
712
- repo: local
813
hooks:
914
- id: unit-tests

0 commit comments

Comments
 (0)