fix: raise error on empty download instead of producing 0-byte file #523
Workflow file for this run
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: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[all]" | |
| - name: Run linting | |
| run: ruff check src/ tests/ | |
| - name: Check formatting | |
| run: ruff format --check src/ tests/ | |
| - name: Run type checking | |
| run: mypy src/notebooklm --ignore-missing-imports | |
| - name: Verify e2e test fixtures | |
| run: pytest tests/e2e --collect-only -q | |
| test: | |
| name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: quality | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[all]" | |
| - name: Get Playwright version | |
| id: playwright-version | |
| shell: bash | |
| run: | | |
| echo "version=$(pip show playwright | grep '^Version:' | cut -d' ' -f2)" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| ~/AppData/Local/ms-playwright | |
| key: playwright-${{ matrix.os }}-${{ steps.playwright-version.outputs.version }} | |
| - name: Install Playwright browsers | |
| run: playwright install chromium | |
| - name: Install Playwright system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: playwright install-deps | |
| - name: Run tests with coverage | |
| run: pytest --cov=src/notebooklm --cov-report=term-missing --cov-fail-under=70 |