1
0

ci.yaml 670 B

1234567891011121314151617181920212223242526272829
  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.10", "3.11", "3.12"]
  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. - name: Tests
  23. run: pytest --cov=switchbot --cov-report=term-missing --cov-report=xml tests
  24. - name: Upload coverage to Codecov
  25. uses: codecov/codecov-action@v3