mirror of
https://github.com/blazickjp/arxiv-mcp-server.git
synced 2025-07-25 20:38:49 +03:00
Adding automate tests
This commit is contained in:
69
.github/workflows/tests.yaml
vendored
Normal file
69
.github/workflows/tests.yaml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main] # or master, depending on your default branch
|
||||
push:
|
||||
branches: [main] # optional: also run on pushes to main
|
||||
|
||||
jobs:
|
||||
test-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install pytest
|
||||
uv pip install -e .
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
|
||||
test-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Install uv
|
||||
run: |
|
||||
iwr https://astral.sh/uv/install.ps1 -useb | iex
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install pytest
|
||||
uv pip install -e .
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
|
||||
test-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install pytest
|
||||
uv pip install -e .
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pymupdf4llm\n",
|
||||
"from .config import Settings\n",
|
||||
"from pathlib import Path\n",
|
||||
"\n",
|
||||
"settings = Settings()\n",
|
||||
"paper_path = Path(settings.STORAGE_PATH) / \"2412.04468v1\"\n",
|
||||
"text_content = pymupdf4llm.to_markdown(paper_path, show_progress=False)\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open(paper_path.with_suffix(\".md\"), \"w\", encoding=\"utf-8\") as f:\n",
|
||||
" f.write(text_content)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": ".venv",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.8"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
Reference in New Issue
Block a user