Skip to content

Commit

Permalink
ci: add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon committed Feb 12, 2024
1 parent f18f904 commit deaf20f
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 21 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/constraints.txt

This file was deleted.

22 changes: 14 additions & 8 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ on:
- cron: "0 0 * * *"

jobs:
# pre-commit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - uses: pre-commit/[email protected]
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: snok/install-poetry@main
- name: Install Dependencies
run: poetry install
shell: bash
- name: Run pre-commit
run: poetry run pre-commit run --all-files --show-diff-on-failure --color=always
shell: bash

hacs:
runs-on: "ubuntu-latest"
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repos:
language: system
types: [python]
require_serial: true
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
require_serial: true
# - id: flake8
# name: flake8
# entry: flake8
# language: system
# types: [python]
# require_serial: true
- id: reorder-python-imports
name: Reorder python imports
entry: reorder-python-imports
Expand Down
27 changes: 26 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python = ">=3.12,<3.13"

[tool.poetry.group.dev.dependencies]
#flake8 = "*"
#reorder-python-imports = "*"
reorder-python-imports = "*"
#pytest = "^8"
#pytest-homeassistant-custom-component = "0.13.100"
pytest-homeassistant-custom-component = ">=0.13.100"
Expand Down

0 comments on commit deaf20f

Please sign in to comment.