tests.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. strategy:
  14. matrix:
  15. python-version: ['3.13']
  16. steps:
  17. - uses: actions/checkout@v4
  18. with:
  19. fetch-depth: 0
  20. - name: Set up Python ${{ matrix.python-version }}
  21. uses: actions/setup-python@v5
  22. with:
  23. python-version: ${{ matrix.python-version }}
  24. - name: Install dependencies
  25. run: |
  26. python -m pip install --upgrade pip
  27. pip install -r requirements-dev.txt
  28. - name: Full test with pytest
  29. run: pytest --cov=custom_components/tuya_local --cov-report term:skip-covered --junit-xml=test-results.xml
  30. - name: Surface results
  31. if: always()
  32. uses: pmeier/pytest-results-action@main
  33. with:
  34. path: test-results.xml
  35. summary: true
  36. display-options: fEX
  37. fail-on-empty: true
  38. title: Test results