Skip to content

feat: improvements and fixes #35

feat: improvements and fixes

feat: improvements and fixes #35

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
id-token: write
jobs:
setup:
runs-on: ubuntu-latest
outputs:
python-version: 3.12
steps:
- run: echo "Setup completed"
test-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
name: [workflow, integration, unit]
include:
- name: unit
test_file: test_browser_fastmcp_client.py
- name: integration
test_file: test_browser_test.py
- name: workflow
test_file: test_browser_workflow_test.py
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: pip install uv
- name: Set environment variables
run: |
echo "UV_HTTP_TIMEOUT=120" >> $GITHUB_ENV
echo 'PW_CHROMIUM_ARGS=--no-sandbox --disable-dev-shm-usage --disable-gpu --single-process' >> $GITHUB_ENV
- name: Install dependencies
run: uv sync --all-extras
- name: Install Playwright browsers
run: uv run playwright install --with-deps chromium
- name: Run tests with coverage [${{ matrix.name }}]
run: |
export PYTEST_ADDOPTS="--durations=10 --tb=short"
uv run python -m pytest \
--cov=browser_fastmcp_server \
--cov=main \
--cov-report=xml \
--cov-report=term \
--reruns 3 \
--reruns-delay 20 \
${{ matrix.test_file }} \
-v \
--maxfail=1
- name: Upload coverage to Codecov [${{ matrix.name }}]
uses: codecov/codecov-action@v5
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: Euraxluo/browser-mcp
file: ./coverage.xml
flags: ${{ matrix.name }}
name: ${{ matrix.name }}
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}