yamltests.yml 874 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: YAML tests
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - 'custom_components/tuya_local/devices/*.yaml'
  7. push:
  8. paths:
  9. - 'custom_components/tuya_local/devices/*.yaml'
  10. jobs:
  11. tests:
  12. runs-on: ubuntu-latest
  13. permissions:
  14. checks: write
  15. contents: read
  16. pull-requests: write
  17. strategy:
  18. matrix:
  19. python-version: ['3.13']
  20. steps:
  21. - uses: actions/checkout@v4
  22. with:
  23. fetch-depth: 0
  24. - name: Set up Python ${{ matrix.python-version }}
  25. uses: actions/setup-python@v5
  26. with:
  27. python-version: ${{ matrix.python-version }}
  28. - name: Install dependencies
  29. run: |
  30. python -m pip install --upgrade pip
  31. pip install -r requirements-dev.txt
  32. - name: Device configs check with pytest
  33. run: pytest tests/test_device_config.py