build(deps): Bump actions/setup-python from 5 to 6 #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install linters | |
| run: | | |
| pip install ruff black | |
| - name: Run Ruff | |
| run: ruff check scripts/ --output-format=github || true | |
| - name: Check formatting | |
| run: black --check scripts/ || true | |
| test: | |
| name: Test Scripts | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install requests aiohttp pytest | |
| - name: Check script syntax | |
| run: | | |
| python -m py_compile scripts/mineru_v2.py | |
| python -m py_compile scripts/mineru_async.py | |
| python -m py_compile scripts/mineru_stable.py | |
| python -m py_compile scripts/mineru_api.py | |
| - name: Test CLI help | |
| run: | | |
| python scripts/mineru_v2.py --help || true | |
| python scripts/mineru_stable.py --help || true | |
| validate-skill: | |
| name: Validate Skill | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate SKILL.md | |
| run: | | |
| # Check SKILL.md exists | |
| test -f SKILL.md || { echo "SKILL.md not found"; exit 1; } | |
| # Check YAML frontmatter | |
| python3 << 'EOF' | |
| import re | |
| with open('SKILL.md', 'r') as f: | |
| content = f.read() | |
| # Extract frontmatter | |
| match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL) | |
| if not match: | |
| print("ERROR: No YAML frontmatter found") | |
| exit(1) | |
| import yaml | |
| try: | |
| fm = yaml.safe_load(match.group(1)) | |
| print(f"name: {fm.get('name')}") | |
| print(f"description: {fm.get('description', '')[:50]}...") | |
| # Validate required fields | |
| assert 'name' in fm, "Missing 'name' field" | |
| assert 'description' in fm, "Missing 'description' field" | |
| print("✅ SKILL.md validation passed") | |
| except Exception as e: | |
| print(f"ERROR: {e}") | |
| exit(1) | |
| EOF | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| needs: validate-skill | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create skill package | |
| run: | | |
| mkdir -p dist | |
| zip -r dist/mineru-skill.zip \ | |
| SKILL.md \ | |
| scripts/*.py \ | |
| references/ \ | |
| LICENSE | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mineru-skill | |
| path: dist/ |