Migrate tests to nimax cassettes and update docs #370
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: Code Standards | |
| on: | |
| push: | |
| paths: | |
| - "**.py" | |
| - "pyproject.toml" | |
| pull_request: | |
| branches: | |
| - master | |
| - dev | |
| paths: | |
| - "**.py" | |
| - "pyproject.toml" | |
| workflow_dispatch: | |
| jobs: | |
| code_styling: | |
| name: "Code Styling" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.11" | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install Dependencies | |
| run: uv sync --group dev | |
| - name: Run Ruff format | |
| run: uv run ruff format homeassistant_api | |
| - name: Run Ruff linting | |
| run: uv run ruff check homeassistant_api | |
| - name: Run Zuban | |
| run: uv run zuban check homeassistant_api | |
| code_functionality: | |
| name: "Code Functionality" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install Dependencies | |
| run: uv sync --group dev | |
| - name: Run Tests | |
| run: uv run pytest --cov --cov-report xml:coverage.xml | |
| - name: Upload Coverage Report | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.xml |