mirror of
https://github.com/docling-project/docling-serve.git
synced 2026-04-24 02:21:34 +00:00
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
name: Run checks
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
py-lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.12']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install uv and set the python version
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: true
|
|
|
|
- name: pre-commit cache key
|
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pre-commit
|
|
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --frozen --all-extras --no-extra cu124
|
|
|
|
- name: Run styling check
|
|
run: pre-commit run --all-files
|
|
|
|
build-package:
|
|
uses: ./.github/workflows/job-build.yml
|
|
|
|
test-package:
|
|
needs:
|
|
- build-package
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.12']
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
- name: Install uv and set the python version
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: true
|
|
- name: Install package
|
|
run: uv pip install dist/*.whl
|
|
- name: Create the server
|
|
run: python -c 'from docling_serve.app import create_app; create_app()'
|
|
|
|
markdown-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: markdownlint-cli2-action
|
|
uses: DavidAnson/markdownlint-cli2-action@v16
|
|
with:
|
|
globs: "**/*.md"
|
|
|