Improve and fix CI #322
Workflow file for this run
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: | |
jobs: | |
tests: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312} | |
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311} | |
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310} | |
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} | |
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' | |
- name: Upgrade bootstrap packages | |
run: python -m pip install --upgrade pip tox | |
- 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: Run tox | |
run: tox -e ${{ matrix.tox }} | |
env: | |
PY_COLORS: 1 | |
TOX_TESTENV_PASSENV: PY_COLORS | |
- name: Test pytesseract package installation | |
run: pip install -U . && pip show pytesseract && python -c 'import pytesseract' |