jsontests.yml 988 B

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