Skip to content

Commit 96b1beb

Browse files
committed
Merge main into feature/devcontainer-updates
2 parents 0f80f08 + 4db35c4 commit 96b1beb

88 files changed

Lines changed: 13427 additions & 1439 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Mark autogenerated files so they are excluded from code review
2-
custom_components/lock_code_manager/www/lock-code-manager-strategy.js linguist-generated=true
2+
custom_components/lock_code_manager/www/generated/** linguist-generated=true

.github/.codecov.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ coverage:
88
precision: 2
99
round: down
1010
range: "70...100"
11+
status:
12+
project:
13+
default:
14+
target: auto
15+
threshold: 1% # Allow up to 1% coverage drop
16+
patch:
17+
default:
18+
target: 100%
19+
threshold: 0%
1120

1221
parsers:
1322
gcov:

.github/release-drafter.yml

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,43 @@ autolabeler:
1111
files:
1212
- '*.ts'
1313
- '*.js'
14-
- 'package.json'
15-
- 'package-lock.json'
16-
- 'yarn.lock'
14+
- 'ts/**/*'
1715
- '.eslintrc.cjs'
1816
- 'tsconfig.json'
1917
- 'rollup.config.js'
18+
- 'package.json'
19+
- 'package-lock.json'
20+
- 'yarn.lock'
2021
- label: 'python'
2122
files:
22-
- 'requirements_*.txt'
23+
- '*.py'
24+
- 'custom_components/**/*.py'
25+
- 'tests/**/*.py'
26+
- 'tox.ini'
27+
- 'requirements*.txt'
28+
- 'pyproject.toml'
2329
- 'Pipfile'
2430
- 'Pipfile.lock'
25-
- 'setup.py'
26-
- 'pyproject.toml'
27-
- 'tox.ini'
28-
- '*.py'
2931
- label: 'github_actions'
3032
files:
31-
- '.github/*'
33+
- '.github/workflows/**/*'
3234
- label: 'dependencies'
35+
files:
36+
- 'requirements*.txt'
37+
- 'pyproject.toml'
38+
- 'Pipfile'
39+
- 'Pipfile.lock'
40+
- 'package.json'
41+
- 'package-lock.json'
42+
- 'yarn.lock'
43+
- '.pre-commit-config.yaml'
3344
body:
3445
- '/\[x\] dependency/i'
46+
- label: 'documentation'
47+
files:
48+
- '*.md'
49+
- '**/*.md'
50+
- 'docs/**/*'
3551
- label: 'bug'
3652
body:
3753
- '/\[x\] bugfix/i'
@@ -48,34 +64,48 @@ autolabeler:
4864
version-resolver:
4965
major:
5066
labels:
51-
- "major"
67+
- "lcm-major"
5268
minor:
5369
labels:
54-
- "minor"
70+
- "lcm-minor"
5571
patch:
5672
labels:
57-
- "patch"
73+
- "lcm-patch"
5874
default: patch
5975
categories:
60-
- title: ":boom: Breaking Change :boom:"
76+
- title: "⚠️ Breaking Changes"
6177
labels:
6278
- "breaking-change"
63-
- title: ":zap: Enhancements :zap:"
79+
- title: "🆕 Enhancements"
6480
labels:
6581
- "enhancement"
66-
- title: ":bug: Bug Fixes :bug:"
82+
- title: " Bug Fixes"
6783
labels:
6884
- "fix"
6985
- "bugfix"
7086
- "bug"
71-
- title: ":mortar_board: Code Quality :mortar_board:"
87+
- title: " Code Quality"
7288
labels:
7389
- "code-quality"
74-
- title: "⬆️ Dependencies"
90+
- title: "📝 Documentation"
91+
collapse-after: 1
92+
labels:
93+
- "documentation"
94+
exclude-labels:
95+
- "python"
96+
- "javascript"
97+
- title: "📦 Dependencies"
7598
collapse-after: 1
7699
labels:
77100
- "dependencies"
78101
- "pre-commit"
102+
- title: "🧹 Housekeeping"
103+
collapse-after: 1
104+
labels:
105+
- "github_actions"
106+
exclude-labels:
107+
- "python"
108+
- "javascript"
79109
# yamllint disable rule:line-length
80110
template: |
81111
[![Downloads for this release](https://img.shields.io/github/downloads/raman325/lock_code_manager/$RESOLVED_VERSION/total.svg)](https://github.com/raman325/lock_code_manager/releases/$RESOLVED_VERSION)

.github/workflows/auto-merge.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
name: Yarn test, lint, and build
2+
name: Frontend
33

4+
# yamllint disable-line rule:truthy
45
on:
56
push:
67
branches: [main]
@@ -13,6 +14,7 @@ on:
1314
- "rollup.config.js"
1415
- "tsconfig.json"
1516
- "vitest.config.ts"
17+
- ".github/workflows/frontend.yaml"
1618
pull_request:
1719
branches: [main]
1820
paths:
@@ -24,51 +26,62 @@ on:
2426
- "rollup.config.js"
2527
- "tsconfig.json"
2628
- "vitest.config.ts"
29+
- ".github/workflows/frontend.yaml"
2730

2831
jobs:
29-
yarn:
30-
name: Yarn test, lint, and build
32+
lint-and-build:
33+
# pre-commit.ci skips yarn-lint and yarn-build (Node.js not available), so CI needs this job
34+
name: Yarn Lint and Build
3135
runs-on: ubuntu-latest
32-
strategy:
33-
matrix:
34-
node-version:
35-
- "lts/iron"
36-
3736
steps:
3837
- uses: actions/checkout@v6
3938
with:
4039
fetch-depth: 2
41-
- name: Set up Node ${{ matrix.node-version }}
40+
- name: Set up Node
4241
uses: actions/setup-node@v6
4342
with:
44-
node-version: ${{ matrix.node-version }}
45-
- name: Install
43+
node-version: lts/iron
44+
- name: Install dependencies
4645
run: yarn install
47-
- name: Test
48-
run: yarn test
4946
- name: Lint
50-
run: |
51-
yarn lint:fix
47+
run: yarn lint:fix
5248
- name: Check for changes from lint
5349
id: change_lint
54-
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
5550
run: echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
5651
- name: Check if clean from lint
5752
if: steps.change_lint.outputs.changed != 0
5853
uses: actions/github-script@v8
5954
with:
6055
script: |
61-
core.setFailed('Repo is dirty after lint! Run yarn lint:fix locally before pushing changes.')
56+
core.setFailed('Repo is dirty after lint! Run yarn lint:fix locally before pushing changes.')
6257
- name: Build
63-
run: |
64-
yarn build
58+
run: yarn build
6559
- name: Check for changes from build
6660
id: change_build
67-
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
6861
run: echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
6962
- name: Check if clean from build
7063
if: steps.change_build.outputs.changed != 0
7164
uses: actions/github-script@v8
7265
with:
7366
script: |
74-
core.setFailed('Repo is dirty after build! Run yarn build locally before pushing changes.')
67+
core.setFailed('Repo is dirty after build! Run yarn build locally before pushing changes.')
68+
69+
test:
70+
name: Vitest
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v6
74+
- name: Set up Node
75+
uses: actions/setup-node@v6
76+
with:
77+
node-version: lts/iron
78+
- name: Install dependencies
79+
run: yarn install
80+
- name: Run tests
81+
run: yarn test --coverage --coverage.reporter=json
82+
- name: Upload coverage to Codecov
83+
uses: codecov/codecov-action@v5
84+
with:
85+
token: ${{ secrets.CODECOV_TOKEN }}
86+
flags: typescript
87+
files: ./coverage/coverage-final.json

.github/workflows/hacs.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/hassfest.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/integration.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: Integration
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
push:
7+
branches: [main]
8+
paths:
9+
- "**.py"
10+
- ".github/workflows/integration.yaml"
11+
pull_request:
12+
branches: [main]
13+
paths:
14+
- "**.py"
15+
- "requirements*.txt"
16+
- "pyproject.toml"
17+
- ".github/workflows/integration.yaml"
18+
19+
jobs:
20+
test:
21+
name: Pytest
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v6
25+
- name: Set up Python
26+
uses: actions/setup-python@v6
27+
with:
28+
python-version: "3.13"
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v5
31+
with:
32+
enable-cache: true
33+
- name: Install system dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install libudev-dev
37+
- name: Install dependencies
38+
run: uv pip install --system -r requirements_dev.txt
39+
- name: Run tests and generate coverage report
40+
# CI-only deps installed separately to keep requirements_dev.txt lightweight
41+
run: |
42+
uv pip install --system pytest-cov pytest-github-actions-annotate-failures
43+
pytest ./tests/ --cov=custom_components/lock_code_manager/ --cov-report=xml
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v5
46+
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
flags: python
49+
files: coverage.xml
50+
51+
hacs:
52+
name: HACS
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v6
56+
- name: HACS Action
57+
uses: hacs/action@main
58+
with:
59+
category: integration
60+
61+
hassfest:
62+
name: Hassfest
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v6
66+
- uses: home-assistant/actions/hassfest@master

0 commit comments

Comments
 (0)