Skip to content

fix(preprocess): unify PR Newswire identities #36

fix(preprocess): unify PR Newswire identities

fix(preprocess): unify PR Newswire identities #36

Workflow file for this run

name: e2e
on:
pull_request:
branches: [master]
paths:
- '.github/workflows/e2e.yml'
- 'scripts/verify_news_e2e.py'
- 'quantmind/preprocess/_news_types.py'
- 'quantmind/preprocess/clean.py'
- 'quantmind/preprocess/news.py'
- 'quantmind/preprocess/pr_newswire.py'
- 'quantmind/preprocess/time.py'
- 'quantmind/preprocess/format/html.py'
- 'quantmind/preprocess/fetch/__init__.py'
- 'quantmind/preprocess/fetch/_types.py'
- 'quantmind/preprocess/fetch/http.py'
- 'quantmind/preprocess/fetch/rss.py'
- 'quantmind/preprocess/fetch/arxiv.py'
- 'quantmind/preprocess/format/pdf.py'
- 'quantmind/rag/**'
- 'quantmind/configs/paper.py'
- 'quantmind/flows/_paper_summary.py'
- 'quantmind/flows/paper.py'
- 'quantmind/knowledge/paper.py'
- 'quantmind/library/**'
- 'scripts/verify_pdf_rag_e2e.py'
- 'scripts/verify_structure_e2e.py'
- 'quantmind/mind/**'
- 'quantmind/configs/retrieval.py'
- 'quantmind/configs/structure.py'
- 'quantmind/flows/paper/**'
- 'quantmind/preprocess/outline.py'
- 'quantmind/utils/structured_output.py'
- 'pyproject.toml'
schedule:
- cron: "17 3 * * *"
workflow_dispatch:
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
news: ${{ steps.filter.outputs.news }}
paper_flow: ${{ steps.filter.outputs.paper_flow }}
structure: ${{ steps.filter.outputs.structure }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect component changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
news:
- '.github/workflows/e2e.yml'
- 'scripts/verify_news_e2e.py'
- 'quantmind/preprocess/_news_types.py'
- 'quantmind/preprocess/clean.py'
- 'quantmind/preprocess/news.py'
- 'quantmind/preprocess/pr_newswire.py'
- 'quantmind/preprocess/time.py'
- 'quantmind/preprocess/format/html.py'
- 'quantmind/preprocess/fetch/**'
- 'pyproject.toml'
paper_flow:
- '.github/workflows/e2e.yml'
- 'scripts/verify_pdf_rag_e2e.py'
- 'quantmind/configs/paper.py'
- 'quantmind/flows/_paper_summary.py'
- 'quantmind/flows/paper.py'
- 'quantmind/knowledge/paper.py'
- 'quantmind/library/**'
- 'quantmind/preprocess/fetch/arxiv.py'
- 'quantmind/preprocess/format/pdf.py'
- 'quantmind/rag/**'
- 'pyproject.toml'
structure:
- '.github/workflows/e2e.yml'
- 'scripts/verify_structure_e2e.py'
- 'quantmind/mind/**'
- 'quantmind/configs/retrieval.py'
- 'quantmind/configs/structure.py'
- 'quantmind/flows/paper/**'
- 'quantmind/knowledge/paper.py'
- 'quantmind/knowledge/_tree.py'
- 'quantmind/library/**'
- 'quantmind/preprocess/outline.py'
- 'quantmind/preprocess/format/pdf.py'
- 'quantmind/utils/structured_output.py'
- 'pyproject.toml'
news:
needs: changes
if: github.event_name != 'pull_request' || needs.changes.outputs.news == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- name: Create virtual environment
run: uv venv
- name: Install project runtime dependencies
run: uv pip install --python .venv/bin/python -e .
- name: Run live news E2E
run: .venv/bin/python scripts/verify_news_e2e.py
paper-flow:
needs: changes
if: github.event_name != 'pull_request' || needs.changes.outputs.paper_flow == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- name: Create virtual environment
run: uv venv
- name: Install project runtime dependencies
run: uv pip install --python .venv/bin/python -e .
- name: Check OpenAI credential
id: openai
shell: bash
run: |
if [[ -n "${OPENAI_API_KEY}" ]]; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "available=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping Paper Flow V1 E2E because OPENAI_API_KEY is not configured."
fi
- name: Run live Paper Flow V1 E2E
if: steps.openai.outputs.available == 'true'
run: .venv/bin/python scripts/verify_pdf_rag_e2e.py
structure:
needs: changes
if: github.event_name != 'pull_request' || needs.changes.outputs.structure == 'true'
runs-on: ubuntu-latest
timeout-minutes: 18
env:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- name: Create virtual environment
run: uv venv
- name: Install project runtime dependencies
run: uv pip install --python .venv/bin/python -e .
- name: Check OpenRouter credential
id: openrouter
shell: bash
run: |
if [[ -n "${OPENROUTER_API_KEY}" ]]; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "available=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping structure-retrieval E2E because OPENROUTER_API_KEY is not configured."
fi
- name: Run live structure-retrieval E2E
if: steps.openrouter.outputs.available == 'true'
run: .venv/bin/python scripts/verify_structure_e2e.py