chore(release): v0.8.2 — timing-flake fix (#44) #141
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] | |
| workflow_dispatch: | |
| jobs: | |
| # Fast unit tests + lint (no browser required) | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| # ``[capture]`` is required even for unit tests: 169 tests | |
| # ``importorskip("playwright")`` and would silently skip without | |
| # it, dropping ``capture/browser.py`` coverage from 87% to 36% | |
| # and total below the 90% gate. The chromium binary is *not* | |
| # installed here — only the Playwright Python package, which is | |
| # what those unit tests actually need. | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,cli,capture]" | |
| - name: Lint with ruff | |
| run: ruff check . | |
| - name: Run unit tests | |
| run: pytest -m "not integration" --cov=har_capture --cov-report=term-missing | |
| - name: Enforce per-module coverage floors | |
| run: python scripts/check_coverage_floors.py | |
| # Full test suite with Playwright - uploads combined coverage | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: test # Only run if unit tests pass | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,cli,capture]" | |
| - name: Install Playwright browsers | |
| run: playwright install chromium --with-deps | |
| - name: Run unit tests with coverage | |
| run: pytest -m "not integration" --cov=har_capture --cov-report= | |
| - name: Run integration tests with coverage (append) | |
| run: pytest -m "integration" --cov=har_capture --cov-append --cov-report=xml -v | |
| - name: Upload combined coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| fail_ci_if_error: false |