1
0

ci.yaml 812 B

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