feat: skip pages that are too large to process #651
Workflow file for this run
This file contains 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: Run Tests 🧪 | |
on: | |
push: | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
test: | |
name: Run Python Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Cached Assets | |
id: cache-assets | |
uses: actions/[email protected] | |
with: | |
path: ~/.cache/babeldoc | |
key: babeldoc-assets-${{ hashFiles('babeldoc/assets/embedding_assets_metadata.py') }} | |
- name: Setup uv with Python ${{ matrix.python-version }} | |
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Warm up cache | |
run: | | |
uv run babeldoc --warmup | |
- name: Run tests | |
run: | | |
uv run babeldoc --help | |
uv run babeldoc --bing --files examples/ci/test.pdf | |
- name: Generate offline assets package | |
run: | | |
uv run babeldoc --generate-offline-assets /tmp/offline_assets | |
- name: Restore offline assets package | |
run: | | |
rm -rf ~/.cache/babeldoc | |
uv run babeldoc --restore-offline-assets /tmp/offline_assets | |
- name: Clean up | |
run: | | |
rm -rf /tmp/offline_assets | |
rm -rf ~/.cache/babeldoc/cache.v1.db | |
rm -rf ~/.cache/babeldoc/working |