Skip to content

refactor: cleanup redundant test files #9

refactor: cleanup redundant test files

refactor: cleanup redundant test files #9

Workflow file for this run

name: CI
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 6 * * *' # 06:00 UTC nightly Playwright + Layer 2 sweep
workflow_dispatch: # allow manual trigger of the e2e job
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync --extra dev
- name: Run ruff check
run: uv run ruff check src/ tests/
- name: Run mypy
run: uv run mypy src/ || true
- name: Run tests with coverage
run: uv run pytest --cov --cov-report=term-missing --timeout=30 tests/
- name: Enforce coverage threshold
run: uv run coverage report
test-e2e-playwright:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
name: Playwright Layer 2 (nightly + manual)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies (twitter extra for playwright)
run: uv sync --extra dev --extra twitter
- name: Install Playwright browsers
run: uv run playwright install chromium --with-deps
- name: Run Layer 2 (Playwright + GraphQL stubbing) tests
run: uv run pytest -m requires_playwright --timeout=60 tests/test_twitter.py
- name: Run full suite with coverage (Layer 1 + Layer 2)
run: uv run pytest --cov --cov-report=xml --cov-report=term-missing --timeout=30 tests/
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-coverage
path: coverage.xml