Skip to content

chore(deps): update astral-sh/ruff-action action to v4 (#4652) #104

chore(deps): update astral-sh/ruff-action action to v4 (#4652)

chore(deps): update astral-sh/ruff-action action to v4 (#4652) #104

Workflow file for this run

name: Lint
on:
push:
branches:
- "main"
paths:
- '**.py' # Run if pushed commits include a change to a Python (.py) file.
- '.github/workflows/lint.yaml' # Run if pushed commits include a change to a github actions workflow file.
- 'pyproject.toml' # Run if project configuration file changes.
pull_request:
branches:
- "main"
paths:
- '**.py' # Run if pushed commits include a change to a Python (.py) file.
- '.github/workflows/lint.yaml' # Run if pushed commits include a change to a github actions workflow file.
- 'pyproject.toml' # Run if project configuration file changes.
workflow_dispatch:
jobs:
ruff_check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Ruff Check
uses: astral-sh/ruff-action@v4.0.0
with:
args: check --output-format=github
- name: Ruff Format
uses: astral-sh/ruff-action@v4.0.0
with:
args: format --check --diff
mypy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync
- name: Run mypy
run: uv run mypy custom_components/battery_notes/ --check-untyped-defs