-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (82 loc) · 2.6 KB
/
Copy pathtests-extract-python.yml
File metadata and controls
87 lines (82 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Tests extract-python
on:
push:
branches: [ 'main' ]
pull_request:
paths:
- 'extract-core/**'
- 'extract-python/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v3
with:
args: "--version" # skips test by displaying the version
- name: Check formatting
run: ruff format --config qa/ruff.toml --check extract-python
- name: Lint test
run: ruff check --config qa/ruff.toml extract-python
tests-no-miner-u:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.12
ASTRAL_VERSION: 0.11.6
steps:
- uses: actions/checkout@v6
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
- name: Install tesseract
run: |
sudo apt-get update
sudo apt-get install -y --fix-missing tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-fra \
tesseract-ocr-deu \
tesseract-ocr-spa \
tesseract-ocr-lat \
tesseract-ocr-jpn \
libtesseract-dev \
libleptonica-dev \
pkg-config
echo "TESSDATA_PREFIX=$(sudo dpkg -L tesseract-ocr-eng | grep tessdata$)" >> $GITHUB_ENV
- name: Run tests
run: |
cd extract-python
uv sync --dev --extra docling --extra marker --frozen
uv run --frozen pytest -m "not miner_u" -vvv --cache-clear --show-capture=all -r A tests
tests-miner-u:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.12
ASTRAL_VERSION: 0.11.6
steps:
- uses: actions/checkout@v6
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: extract-python
- name: Run tests
run: |
cd extract-python
uv sync --verbose --dev --extra mineru --frozen
uv run --frozen python -m pytest -m "miner_u" -vvv --cache-clear --show-capture=all -r A tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true