Skip to content

Commit

Permalink
workflows: Lint with ruff, mypy, black and isort
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed Feb 22, 2023
1 parent d965456 commit 0ec2c6f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Lint"

on:
push:
pull_request:

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.5.0
with:
python-version: "3.x"
- name: Install pdm
run: |
python3 -m pip install pdm
- name: Run black
run: |
pdm install
pdm info
pdm venv activate
- name: Run ruff
run: |
ruff custom_components
- name: Run mypy
run: |
mypy custom_components
- name: Run black
run: |
black --check --diff custom_components
- name: Run isort
run: |
isort --check-only --diff -- custom_components

0 comments on commit 0ec2c6f

Please sign in to comment.