name: PR Checks
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-asyncio
- name: Run quick tests
run: |
pytest tests/ -v --tb=short
- name: Validate package can be imported
run: |
python -c "from markdown_editor import server"
python -c "from markdown_editor.core import parser, engine"
python -c "from markdown_editor.tools import edit_tools, file_ops"
- name: Check version consistency
run: |
VERSION=$(grep "^version = " pyproject.toml | cut -d'"' -f2)
echo "Package version: $VERSION"
if [ -z "$VERSION" ]; then
echo "Error: Version not found in pyproject.toml"
exit 1
fi