Add test case for language tags pattern #385
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: | |
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' |