ENH: extract-images now has option for output folder #717
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| platform: [ubuntu-latest, windows-latest, macos-latest] | |
| name: pytest on ${{ matrix.python-version }} / ${{ matrix.platform }} | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: 'recursive' | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install requirements | |
| run: pip install . --group dev | |
| - name: Install pdfly | |
| if: matrix.python-version != '3.8' | |
| run: pip install . | |
| - name: Install pdfly using the minimal versions of the dependencies | |
| if: matrix.python-version == '3.8' | |
| run: | | |
| # We ensure that those minimal versions remain compatible: | |
| sed -i '/dependencies = \[/,/\]/s/>=/==/' pyproject.toml | |
| pip install . | |
| - name: Run tests | |
| run: pytest -vv | |
| codestyle: | |
| name: Check code with black, mypy, ruff & typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: 'recursive' | |
| - name: Cache Downloaded Files | |
| id: cache-downloaded-files | |
| uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 | |
| with: | |
| path: '**/tests/pdf_cache/*' | |
| key: cache-downloaded-files | |
| - name: Upgrade pip, install pdfly and its dev dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install . --group dev | |
| - name: Lint with black | |
| run: black --check --extend-exclude sample-files . | |
| - name: Lint with mypy | |
| run: mypy . --ignore-missing-imports --exclude build | |
| - name: Test with ruff | |
| run: ruff check pdfly/ | |
| - name: Spell Check Repo | |
| uses: crate-ci/typos@65120634e79d8374d1aa2f27e54baa0c364fff5a # v1.42.1 | |
| package: | |
| name: Build & verify package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{env.PYTHON_LATEST}} | |
| - name: Build package | |
| run: | | |
| python -m pip install flit check-wheel-contents | |
| flit build | |
| ls -l dist | |
| check-wheel-contents dist/*.whl | |
| - name: Test installing package | |
| run: python -m pip install . | |
| - name: Test running installed package | |
| working-directory: /tmp | |
| run: python -c "import pdfly;print(pdfly.__version__)" |