Skip to content

Validate

Validate #1851

Workflow file for this run

name: Validate
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: HACS Action
uses: "hacs/action@main"
with:
category: "integration"
ignore: "brands"
validate_hassfest:
name: Hassfest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate
uses: home-assistant/actions/hassfest@master
validate_ruff:
name: Test + Advice with Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
version: latest
- name: Create Virtual Environment
run: uv venv
- name: Install Ruff using uv
run: uv pip install ruff
- name: Lint critical errors with ruff
run: |
uv run ruff check . --select E9,F63,F7,F82
- name: Don't mind these (less strict)
run: |
uv run ruff check . --exit-zero --select I,COM812,T201
- name: Docstrings
run: |
uv run ruff check . --exit-zero --select D
- name: Unused code warnings
run: |
echo "Some stuff may not be used, but is used in commented out code."
echo "Make sure you check with the find command before you remove anything!"
uv run ruff check . --exit-zero --select F
echo "Some stuff may not be used, but is used in commented out code."
echo "Make sure you check with the find command before you remove anything!"
- name: General stats, ignoring specific codes
run: |
uv run ruff check . --exit-zero --statistics --ignore I,COM812,T201,D,F