chore: removed partials #155
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: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: "pyproject.toml" | |
- name: Install Dependencies | |
if: steps.python-cache.outputs.cache-hit != 'true' | |
run: uv sync | |
- name: Load Cached Pre-Commit Dependencies | |
id: cached-pre-commit-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Execute Pre-Commit | |
run: uv run pre-commit run --show-diff-on-failure --color=always --all-files | |
test: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macOS-latest, windows-latest ] | |
python: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Cache Python Dependencies | |
id: python-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/uv | |
.venv | |
key: python-dependencies-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
python-dependencies-${{ runner.os }}-${{ matrix.python }}- | |
- name: Install Dependencies | |
if: steps.python-cache.outputs.cache-hit != 'true' | |
run: uv sync --all-extras --dev | |
- name: Cache Test Artifacts | |
uses: actions/cache@v4 | |
with: | |
path: .pytest_cache/ | |
key: pytest-cache-${{ runner.os }}-${{ matrix.python }} | |
- name: Cache and Install Homebrew (macOS) | |
if: runner.os == 'macOS' | |
uses: tecolicom/actions-use-homebrew-tools@v1 | |
with: | |
tools: 'tesseract tesseract-lang pandoc' | |
key: 'homebrew-tools-${{ runner.os }}' | |
cache: yes | |
verbose: false | |
- name: Cache and Install APT Packages (Linux) | |
if: runner.os == 'Linux' | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: tesseract-ocr tesseract-ocr-deu pandoc | |
version: 1.0 | |
- name: Install System Dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
choco install -y tesseract pandoc | |
Write-Output "C:\Program Files\Tesseract-OCR" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
Write-Output "C:\Program Files\Pandoc" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
$env:PATH = "C:\Program Files\Tesseract-OCR;C:\Program Files\Pandoc;" + $env:PATH | |
tesseract --version | |
pandoc --version | |
- name: Run Tests | |
run: uv run pytest |