-
Notifications
You must be signed in to change notification settings - Fork 722
48 lines (44 loc) · 1.59 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main, master]
tags: '*'
pull_request:
env:
PYTHON_LATEST_TAG: py313
PYTHON_LATEST_VER: 3.13
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tox:
name: ${{ matrix.env }}
runs-on: ubuntu-latest
strategy:
matrix:
env: [py39, py310, py311, py312, py313]
steps:
- uses: asottile/workflows/.github/actions/fast-checkout@v1.8.0
with:
submodules: false
- uses: actions/setup-python@v5
with:
python-version: |
${{
(matrix.env == 'py39' || startsWith(matrix.env, 'py39-')) && '3.9' ||
(matrix.env == 'py310' || startsWith(matrix.env, 'py310-')) && '3.10' ||
(matrix.env == 'py311' || startsWith(matrix.env, 'py311-')) && '3.11' ||
(matrix.env == 'py312' || startsWith(matrix.env, 'py312-')) && '3.12' ||
(matrix.env == env.PYTHON_LATEST_TAG) && env.PYTHON_LATEST_VER
}}
- name: Install tesseract
run: sudo apt-get -y update && sudo apt-get install -y tesseract-ocr tesseract-ocr-fra
- name: Print tesseract version
run: echo $(tesseract --version)
- name: Update tools
run: python -mpip install --upgrade setuptools tox virtualenv
- name: Run tox
run: tox -e ${{ matrix.env != env.PYTHON_LATEST_TAG && matrix.env || 'pandas' }}
- name: Test pytesseract package installation
if: ${{ matrix.env == env.PYTHON_LATEST_TAG }}
run: python -mpip install -U . && python -mpip show pytesseract && python -c 'import pytesseract'