Skip to content

Commit

Permalink
Merge pull request #532 from egeakman/improve-ci
Browse files Browse the repository at this point in the history
Improve and fix CI
  • Loading branch information
bozhodimitrov committed Jan 23, 2024
2 parents ba23092 + 60e7108 commit 0661082
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/ci.yaml
Expand Up @@ -2,13 +2,9 @@ name: CI

on:
push:
branches:
- master
- '*.x'
branches: [main, master]
tags: '*'
pull_request:
branches:
- master
- '*.x'

jobs:
tests:
Expand All @@ -19,27 +15,23 @@ jobs:
fail-fast: true
matrix:
include:
- {name: '3.12', python: '3.12', os: ubuntu-20.04, tox: py312}
- {name: '3.11', python: '3.11', os: ubuntu-20.04, tox: py311}
- {name: '3.10', python: '3.10', os: ubuntu-20.04, tox: py310}
- {name: '3.9', python: '3.9', os: ubuntu-20.04, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-20.04, tox: py38}
- {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@v3
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
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: Set Python version
# See https://pre-commit.com/#github-actions-example
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV

- name: Install tesseract
run: sudo apt-get -y update && sudo apt-get install -y tesseract-ocr tesseract-ocr-fra

Expand All @@ -53,4 +45,4 @@ jobs:
TOX_TESTENV_PASSENV: PY_COLORS

- name: Test pytesseract package installation
run: pip install -U git+${{ github.server_url }}/${{ github.repository }} && pip show pytesseract && python -c 'import pytesseract'
run: pip install -U . && pip show pytesseract && python -c 'import pytesseract'

0 comments on commit 0661082

Please sign in to comment.