Bump pnpm/action-setup from 4 to 5 #28
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: Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Install Playwright browsers | |
| run: | | |
| playwright install chromium | |
| playwright install-deps chromium | |
| - name: Run tests with pytest | |
| run: | | |
| pytest -v --cov=src --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.python-version == '3.11' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| test-examples: | |
| name: Test Examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| playwright install chromium | |
| playwright install-deps chromium | |
| - name: Run example scripts | |
| run: | | |
| # Basic walkthrough | |
| timeout 30 python examples/basic_example.py || true | |
| # Advanced interaction logic | |
| timeout 30 python examples/advanced_interactions.py || true | |
| # Data flow (read CSV/write JSON) | |
| timeout 30 python examples/custom_data_flow.py || true | |
| # Nested patterns | |
| timeout 30 python examples/nested_loops.py || true | |
| # Concurrency & scaling | |
| timeout 60 python examples/parallel_scraping_showcase.py || true | |
| # Kitchen sink | |
| timeout 60 python examples/advanced_example.py || true | |
| build-docs: | |
| name: Verify Documentation Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: docs-site/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: cd docs-site && pnpm install | |
| - name: Build documentation | |
| run: cd docs-site && pnpm run docs:build | |