Skip to content

Commit 37250ad

Browse files
committed
Migrate lint workflow to validate and fix action versions for ha
1 parent 573ca99 commit 37250ad

File tree

3 files changed

+24
-43
lines changed

3 files changed

+24
-43
lines changed

.github/workflows/lint.yml

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

.github/workflows/release.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ permissions:
1010
contents: write
1111

1212
jobs:
13-
lint:
14-
name: Lint
15-
uses: ./.github/workflows/lint.yml
16-
secrets: inherit
17-
1813
validate:
1914
name: Validate
2015
uses: ./.github/workflows/validate.yml
@@ -23,7 +18,6 @@ jobs:
2318
publish:
2419
name: Publish GitHub release
2520
needs:
26-
- lint
2721
- validate
2822
runs-on: ubuntu-latest
2923
steps:

.github/workflows/validate.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@v6
2424

2525
- name: Run hassfest validation
26-
uses: home-assistant/actions/hassfest@v1
26+
uses: home-assistant/actions/hassfest@6778c32c6da322382854bd824e30fd4a4f3c20e5 # master
2727

2828
hacs: # https://github.com/hacs/action
2929
name: HACS validation
@@ -33,12 +33,34 @@ jobs:
3333
uses: actions/checkout@v6
3434

3535
- name: Run HACS validation
36-
uses: hacs/action@v22
36+
uses: hacs/action@v22.5.0
3737
with:
3838
category: integration
3939
# Remove this 'ignore' key when you have added brand images for your integration to https://github.com/home-assistant/brands
4040
ignore: brands
4141

42+
ruff:
43+
name: Lint
44+
runs-on: "ubuntu-latest"
45+
steps:
46+
- name: Checkout the repository
47+
uses: actions/checkout@v6
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v6
51+
with:
52+
python-version: "3.13"
53+
cache: "pip"
54+
55+
- name: Install requirements
56+
run: python3 -m pip install -r requirements.txt
57+
58+
- name: Lint
59+
run: python3 -m ruff check .
60+
61+
- name: Format
62+
run: python3 -m ruff format . --check
63+
4264
tests:
4365
name: Unit tests
4466
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)