tests.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: Python tests
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. paths:
  6. - '**.py'
  7. push:
  8. paths:
  9. - '**.py'
  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: Full test with pytest
  33. run: pytest --cov=custom_components/tuya_local --cov-report term:skip-covered --junit-xml=test-results.xml
  34. - name: Surface results
  35. if: always()
  36. uses: pmeier/pytest-results-action@main
  37. with:
  38. path: test-results.xml
  39. summary: true
  40. display-options: fEX
  41. fail-on-empty: true
  42. title: Test results