Skip to content

Git test action update VII. #70

Git test action update VII.

Git test action update VII. #70

Workflow file for this run

name: Run tests
on:
push:
branches: [ devel, master ]
pull_request:
branches: [ devel, master ]
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./
strategy:
matrix:
python-version: ["3.11"]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-add-repository multiverse && \
sudo apt-add-repository universe && \
sudo add-apt-repository ppa:graphics-drivers/ppa && \
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y python3-dev python3-pip python3.11 python3.11-dev python3.11-venv python3.11-doc
sudo apt-get install -y \
pkg-config \
gnupg \
libssl-dev \
wget \
curl \
gnupg \
gnupg-agent \
dirmngr \
ca-certificates \
apt-transport-https \
fonts-dejavu \
build-essential \
unixodbc \
unixodbc-dev \
gfortran \
gcc \
g++
sudo echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
sudo apt-get install -y --no-install-recommends fontconfig ttf-mscorefonts-installer
sudo fc-cache -f -v
sudo apt-get install -y libimage-exiftool-perl libtcnative-1 && \
sudo apt-get install -y ttf-mscorefonts-installer fontconfig && \
sudo apt-get install -y --fix-missing libsm6 libxext6 gstreamer1.0-libav fonts-deva fonts-dejavu fonts-gfs-didot fonts-gfs-didot-classic fonts-junicode fonts-ebgaramond fonts-noto-cjk fonts-takao-gothic fonts-vlgothic && \
sudo apt-get install -y --fix-missing ghostscript ghostscript-x gsfonts gsfonts-other gsfonts-x11 fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito fonts-liberation fonts-open-sans fonts-noto-core fonts-ibm-plex fonts-urw-base35 && \
sudo apt-get install -y --fix-missing imagemagick libcairo2-dev tesseract-ocr tesseract-ocr-eng tesseract-ocr-osd tesseract-ocr-lat tesseract-ocr-fra tesseract-ocr-deu libleptonica-dev liblept5 && \
sudo apt-get install -y --fix-missing libpcre3 libpcre3-dev && \
sudo apt-get install -y --fix-missing mesa-opencl-icd pocl-opencl-icd && \
sudo apt-get install -y --fix-missing libvips-tools libvips libvips-dev
sudo apt-get install -y python3-tk tcl8.6-dev tk8.6-dev libopenjp2-7-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev
# python3 poppler requirement
sudo apt-get install poppler-utils -y
sudo apt-get install -y --no-install-recommends default-jre libreoffice-java-common libreoffice libreoffice-script-provider-python
sudo apt-get install -y isort flake8
sudo -H python3.11 -m pip install --upgrade pip --break-system-packages
sudo -H python3.11 -m pip install setuptools numpy matplotlib --break-system-packages
sudo -H python3.11 -m pip install wheel virtualenv cython uwsgi --break-system-packages
sudo -H python3.11 -m pip install opencv-python-headless --break-system-packages
sudo -H python3.11 -m pip install --upgrade pip
sudo -H python3.11 -m pip install setuptools
sudo -H python3.11 -m pip install unoserver
sudo -H python3.11 -m pip install --no-cache-dir -r ./requirements.txt
# - name: Check linting and types
# run: |
# isort .
# flake8 .
# mypy . --ignore-missing-imports
- name: Run tests
run: /usr/bin/python3 -m unittest ocr_service/tests/process.py