linting.yml 955 B

123456789101112131415161718192021222324252627282930313233
  1. name: Linting
  2. on: [push, pull_request]
  3. jobs:
  4. lint:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v3
  8. - name: Setup Python
  9. uses: actions/setup-python@v4
  10. with:
  11. python-version: '3.11'
  12. - name: Install dependencies
  13. run: |
  14. python -m pip install --upgrade pip
  15. pip install -r requirements-dev.txt
  16. - name: Python lint
  17. run: |
  18. echo "::add-matcher::ruff.json"
  19. ruff check custom_components/tuya_local
  20. echo "::remove-matcher owner=ruff::"
  21. - name: Python include order
  22. run: ruff check --select I --diff .
  23. - name: Python coding style
  24. run: ruff format --check --diff .
  25. - name: YAML lint
  26. run: |
  27. echo "::add-matcher::yamllint.json"
  28. yamllint -f parsable custom_components/tuya_local/devices
  29. echo "::remove-matcher owner=yamllint::"