1
0

ci.yaml 729 B

123456789101112131415161718192021222324252627282930
  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"]
  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@v3