CI: point the pip cache at requirements_test.txt #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| # The dependency file is not named requirements.txt, so the cache key | |
| # has to be pointed at it explicitly. | |
| cache-dependency-path: requirements_test.txt | |
| - name: Install test dependencies | |
| run: pip install -r requirements_test.txt | |
| - name: Lint | |
| run: ruff check custom_components tests | |
| - name: Run tests | |
| run: pytest -v |