66 tags : ' *'
77 pull_request :
88
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+ cancel-in-progress : true
12+
913jobs :
10- tests :
11- if : " !contains(github.event.head_commit.message, '[skip ci]')"
12- name : ${{ matrix.name }}
13- runs-on : ${{ matrix.os }}
14+ tox :
15+ name : ${{ matrix.env }}
16+ runs-on : ubuntu-latest
1417 strategy :
15- fail-fast : true
1618 matrix :
17- include :
18- - {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
19- - {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
20- - {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
21- - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
22- - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
19+ env : [py39, py310, py311, py312, py-slow]
2320 steps :
24- - uses : actions/checkout@v4
25-
26- - name : Setup Python
27- uses : actions/setup-python@v5
28- with :
29- python-version : ${{ matrix.python }}
30- cache : ' pip'
31-
32- - name : Upgrade bootstrap packages
33- run : python -m pip install --upgrade pip tox
34-
35- - name : Install tesseract
36- run : sudo apt-get -y update && sudo apt-get install -y tesseract-ocr tesseract-ocr-fra
37-
38- - name : Print tesseract version
39- run : echo $(tesseract --version)
40-
41- - name : Run tox
42- run : tox -e ${{ matrix.tox }}
43- env :
44- PY_COLORS : 1
45- TOX_TESTENV_PASSENV : PY_COLORS
46-
47- - name : Test pytesseract package installation
48- run : pip install -U . && pip show pytesseract && python -c 'import pytesseract'
21+ -
uses :
asottile/workflows/.github/actions/[email protected] 22+ with :
23+ submodules : false
24+ - uses : actions/setup-python@v5
25+ with :
26+ python-version : |
27+ ${{
28+ (matrix.env == 'py39' || startsWith(matrix.env, 'py39-')) && '3.9' ||
29+ (matrix.env == 'py310' || startsWith(matrix.env, 'py310-')) && '3.10' ||
30+ (matrix.env == 'py311' || startsWith(matrix.env, 'py311-')) && '3.11' ||
31+ (matrix.env == 'py312' || startsWith(matrix.env, 'py312-')) && '3.12' ||
32+ (matrix.env == 'py-slow' || startsWith(matrix.env, 'py-slow')) && '3.13'
33+ }}
34+ - name : Install tesseract
35+ run : sudo apt-get -y update && sudo apt-get install -y tesseract-ocr tesseract-ocr-fra
36+ - name : Print tesseract version
37+ run : echo $(tesseract --version)
38+ - name : Update tools
39+ run : python -mpip install --upgrade setuptools tox virtualenv
40+ - name : Run tox
41+ run : tox -e ${{ matrix.env }}
42+ - name : Test pytesseract package installation
43+ if : ${{ matrix.env == 'py-slow' }}
44+ run : python -mpip install -U . && python -mpip show pytesseract && python -c 'import pytesseract'
0 commit comments