Validate #1864
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |