1
0

ci.yaml 833 B

123456789101112131415161718192021222324252627282930313233
  1. name: CI
  2. on:
  3. pull_request:
  4. push:
  5. branches: [master]
  6. jobs:
  7. coverage:
  8. runs-on: ubuntu-latest
  9. strategy:
  10. matrix:
  11. python-version: ["3.11", "3.12", "3.13"]
  12. steps:
  13. - uses: actions/checkout@v4
  14. - name: Set up Python
  15. uses: actions/setup-python@v5
  16. with:
  17. python-version: ${{ matrix.python-version }}
  18. cache: "pip"
  19. - name: Install dependencies
  20. run: |
  21. python -m pip install --upgrade pip
  22. pip install -r requirements_dev.txt .
  23. - uses: pre-commit/action@v3.0.0
  24. - name: Tests
  25. run: pytest --cov=switchbot --cov-report=term-missing --cov-report=xml tests
  26. - name: Upload coverage to Codecov
  27. uses: codecov/codecov-action@v5.0.2
  28. with:
  29. token: ${{ secrets.CODECOV_TOKEN }} # required