linting.yml 873 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Linting
  2. on: [push, pull_request]
  3. jobs:
  4. lint:
  5. runs-on: ubuntu-latest
  6. permissions:
  7. checks: write
  8. contents: read
  9. pull-requests: write
  10. env:
  11. UV_SYSTEM_PYTHON: 1
  12. steps:
  13. - uses: actions/checkout@v4
  14. - name: Setup Python
  15. uses: actions/setup-python@v6
  16. with:
  17. python-version: '3.13'
  18. - name: Install uv
  19. uses: astral-sh/setup-uv@v7
  20. - name: Install dependencies
  21. run: uv pip install -r requirements-dev.txt
  22. - name: Python lint
  23. run: ruff check --output-format=github .
  24. - name: Python include order
  25. run: ruff check --select I --diff .
  26. - name: Python coding style
  27. run: ruff format --check --diff .
  28. - name: YAML lint
  29. run: yamllint --format github custom_components/tuya_local/devices