Skip to content

Commit c7bfb30

Browse files
committed
feat: Update GitHub Actions versions, expand example script testing, add documentation build verification, and include status badges in the README.
1 parent aa94692 commit c7bfb30

2 files changed

Lines changed: 55 additions & 10 deletions

File tree

.github/workflows/tests.yml

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

2828
- name: Cache pip packages
29-
uses: actions/cache@v3
29+
uses: actions/cache@v4
3030
with:
3131
path: ~/.cache/pip
3232
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
@@ -48,10 +48,11 @@ jobs:
4848
pytest -v --cov=src --cov-report=xml --cov-report=term
4949
5050
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v3
51+
uses: codecov/codecov-action@v5
5252
if: matrix.python-version == '3.11'
5353
with:
54-
file: ./coverage.xml
54+
token: ${{ secrets.CODECOV_TOKEN }}
55+
files: ./coverage.xml
5556
flags: unittests
5657
name: codecov-umbrella
5758
fail_ci_if_error: false
@@ -65,7 +66,7 @@ jobs:
6566
uses: actions/checkout@v4
6667

6768
- name: Set up Python
68-
uses: actions/setup-python@v4
69+
uses: actions/setup-python@v5
6970
with:
7071
python-version: '3.11'
7172

@@ -76,12 +77,44 @@ jobs:
7677
playwright install chromium
7778
playwright install-deps chromium
7879
79-
- name: Test basic example
80+
- name: Run example scripts
8081
run: |
82+
# Basic walkthrough
8183
timeout 30 python examples/basic_example.py || true
82-
83-
- name: Test advanced example (with timeout)
84-
continue-on-error: true
85-
run: |
84+
# Advanced interaction logic
85+
timeout 30 python examples/advanced_interactions.py || true
86+
# Data flow (read CSV/write JSON)
87+
timeout 30 python examples/custom_data_flow.py || true
88+
# Nested patterns
89+
timeout 30 python examples/nested_loops.py || true
90+
# Concurrency & scaling
91+
timeout 60 python examples/parallel_scraping_showcase.py || true
92+
# Kitchen sink
8693
timeout 60 python examples/advanced_example.py || true
8794
95+
build-docs:
96+
name: Verify Documentation Build
97+
runs-on: ubuntu-latest
98+
99+
steps:
100+
- name: Checkout code
101+
uses: actions/checkout@v4
102+
103+
- name: Install pnpm
104+
uses: pnpm/action-setup@v4
105+
with:
106+
version: 10
107+
108+
- name: Set up Node
109+
uses: actions/setup-node@v4
110+
with:
111+
node-version: 20
112+
cache: 'pnpm'
113+
cache-dependency-path: docs-site/pnpm-lock.yaml
114+
115+
- name: Install dependencies
116+
run: cd docs-site && pnpm install
117+
118+
- name: Build documentation
119+
run: cd docs-site && pnpm run docs:build
120+

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
<strong>A declarative, step-by-step approach to web automation and data extraction with Playwright.</strong>
99
</p>
1010

11+
<p align="center">
12+
<a href="https://github.com/lablnet/stepwright/actions">
13+
<img src="https://github.com/lablnet/stepwright/actions/workflows/tests.yml/badge.svg" alt="Tests" />
14+
</a>
15+
<a href="https://codecov.io/gh/lablnet/stepwright">
16+
<img src="https://codecov.io/gh/lablnet/stepwright/branch/main/graph/badge.svg" alt="Coverage" />
17+
</a>
18+
<a href="https://pypi.org/project/stepwright/">
19+
<img src="https://img.shields.io/pypi/v/stepwright.svg" alt="PyPI version" />
20+
</a>
21+
</p>
22+
1123
## Overview
1224

1325
StepWright completely abstracts away the complexity of raw browser automation scripts. Instead of writing imperative `page.locator(...).click()` commands buried deep in `try/except` loops, StepWright allows you to define **declarative scraping workflows** using dictionaries or Python Dataclasses.

0 commit comments

Comments
 (0)