Add Sonos integration spec and document Hum API surface #21
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Cancel superseded runs on the same ref to save minutes. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| backend: | |
| name: Backend (py${{ matrix.python }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies (locked) | |
| run: uv sync --extra dev --python ${{ matrix.python }} | |
| - name: Lint (ruff) | |
| run: uv run ruff check app/ shim/ | |
| - name: Type-check (mypy --strict) | |
| run: uv run mypy app/ shim/ --strict | |
| - name: Test (pytest, unit only) | |
| # Integration tests hit live YouTube and are deselected by default | |
| # via the pytest config (-m 'not integration'). | |
| run: uv run pytest -q | |
| frontend: | |
| name: Frontend (node20) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type/style check (svelte-check) | |
| run: npm run check | |
| - name: Test (vitest) | |
| run: npm test | |
| - name: Build (vite) | |
| run: npm run build |