Skip to content

Commit

Permalink
add ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
Lendemor committed Feb 6, 2025
1 parent ee48932 commit 26247c5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: pre-commit

on:
pull_request:
branches: ["main"]
push:
branches: ["main"]

jobs:
pre-commit:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: "3.12"
- run: |
pip install pre-commit
pip install pyright
pip install -r requirements.txt
pre-commit run --all-files
env:
SKIP: update-pyi-files
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ repos:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [custom_components, "*_demo"]

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ include = ["custom_components/**/*.py", "ag_grid_demo/**/*.py"]
"__init__.py" = ["F401"]
"env.py" = ["ALL"]
"*/alembic/*" = ["ALL"]
# "tests/*.py" = ["D100", "D103", "D104", "B018","ERA", "PERF", "T", "N"]

0 comments on commit 26247c5

Please sign in to comment.