-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.53 KB
/
Copy pathlint.yml
File metadata and controls
54 lines (45 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Lint
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
permissions: {}
jobs:
ruff:
name: "Ruff"
runs-on: "ubuntu-latest"
steps:
- name: Checkout the repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
enable-cache: true
# Run only ruff (latest). The lint job doesn't import the project, so
# avoid a full `uv run` project sync.
- name: Lint
run: uvx ruff check .
- name: Format
run: uvx ruff format . --check
ty:
name: "ty"
runs-on: "ubuntu-latest"
steps:
- name: Checkout the repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
with:
enable-cache: true
# Develop/type-check against Python 3.14 (Home Assistant requires
# >=3.14.2). Pinning keeps the interpreter deterministic so a future
# release without matching dependency wheels can't sneak in.
python-version: "3.14"
# ty needs the integration's dependencies to resolve imports, so run it
# through `uv run` (which syncs the project's .venv first). The version is
# pinned via the dev dependency group in uv.lock.
- name: Type check
run: uv run ty check custom_components/