fix(lint): Track pytest config and add ruff CI lint job
parent
83ca9b7f67
commit
4b85d2e393
|
|
@ -16,3 +16,19 @@ jobs:
|
||||||
uses: "hacs/action@main"
|
uses: "hacs/action@main"
|
||||||
with:
|
with:
|
||||||
category: "integration"
|
category: "integration"
|
||||||
|
|
||||||
|
# Separate job so a lint failure is distinguishable from HACS validation
|
||||||
|
# failing. Runs the tracked ruff.toml; formatting is deliberately not
|
||||||
|
# checked here, the repository has not been reformatted.
|
||||||
|
lint:
|
||||||
|
name: "Ruff"
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v3"
|
||||||
|
- uses: "actions/setup-python@v5"
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
- name: Install ruff
|
||||||
|
run: pip install ruff==0.16.0
|
||||||
|
- name: Ruff check
|
||||||
|
run: ruff check .
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Pytest configuration for the sws12500 Home Assistant custom component.
|
||||||
|
#
|
||||||
|
# The suite is written against these settings; without them a clean clone
|
||||||
|
# collects the async tests but never awaits them. Kept as a standalone
|
||||||
|
# pytest.ini for the same reason the ruff config lives in ruff.toml: one
|
||||||
|
# tool, one tracked file, no package metadata this repository does not need.
|
||||||
|
|
||||||
|
[pytest]
|
||||||
|
testpaths = tests
|
||||||
|
|
||||||
|
# Most async tests carry no @pytest.mark.asyncio marker, so pytest-asyncio's
|
||||||
|
# default strict mode would skip awaiting them. Auto mode treats every async
|
||||||
|
# test function as an asyncio test.
|
||||||
|
asyncio_mode = auto
|
||||||
|
asyncio_default_fixture_loop_scope = function
|
||||||
Loading…
Reference in New Issue