This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (126 loc) · 5.59 KB
/
test_development.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: All - Development
on:
push:
branches: [ '**' ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_OPENSSL: 1_1_1o
VERSION_PANDOC: 2.19.2
VERSION_POPPLER: 22.02.0
jobs:
test_development:
# --------------------------------------------------------------------------
# Install the development environment and run all tests based on pytest.
# --------------------------------------------------------------------------
name: OS ${{ matrix.os }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
os: ["ubuntu-22.04"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1 # no history, just HEAD
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dev dependencies
run: make pipenv-dev
- name: Compile the Python code
run: make compileall
- name: Create a PostgreSQL container
run: |
chmod +x ./scripts/run_setup_postgresql.sh
- name: Install Step 1 - Necessary system software (incl. Poppler & TeX Live)
run: |
sudo apt-get install -y software-properties-common
sudo apt-get install -y ca-certificates
sudo apt-get update -y
sudo apt-get install -y build-essential \
cmake \
e2fslibs-dev \
gcc \
gnupg \
libaudit-dev \
libblkid-dev \
libboost-all-dev \
libcairo2-dev \
libgif-dev \
libjpeg-dev \
libjpeg-turbo8 \
libnss3 \
libnss3-dev \
libopenjp2-7 \
libopenjp2-7-dev \
libpng-dev \
libtiff-dev \
libwebp-dev \
libz-dev \
lsb-release \
make \
poppler-utils \
software-properties-common \
texlive-base \
texlive-xetex \
wget
- name: Install Step 2 - OpenSSL
run: |
wget --quiet --no-check-certificate -nv https://github.com/openssl/openssl/archive/OpenSSL_${VERSION_OPENSSL}.tar.gz
sudo tar -xf OpenSSL_${VERSION_OPENSSL}.tar.gz
sudo rm -rf openssl
sudo mv openssl-OpenSSL_${VERSION_OPENSSL} openssl
pwd
ls -ll
cd openssl
sudo ./config
sudo make --quiet
sudo make --quiet install
cd ${HOME}
sudo ldconfig
echo "::echo::on"
echo "Current version of OpenSSL: $(openssl version -a)"
- name: Install Step 3 - Pandoc
run: |
wget --quiet --no-check-certificate https://github.com/jgm/pandoc/releases/download/${VERSION_PANDOC}/pandoc-${VERSION_PANDOC}-1-amd64.deb
sudo dpkg -i pandoc-${VERSION_PANDOC}-1-amd64.deb
echo "::echo::on"
echo "Current version of Pandoc: $(pandoc -v)"
echo "Current version of TeX Live: $(pdflatex --version)"
- name: Install Step 4 - Poppler
run: |
wget --quiet --no-check-certificate https://poppler.freedesktop.org/poppler-${VERSION_POPPLER}.tar.xz
sudo tar -xf poppler-${VERSION_POPPLER}.tar.xz
cd poppler-${VERSION_POPPLER}/
sudo mkdir build
cd build
sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DTESTDATADIR=$PWD/testfiles -DENABLE_UNSTABLE_API_ABI_HEADERS=ON ..
sudo make
sudo make install
cd ../..
echo "::echo::on"
echo "Current version of Poppler: $(pdftocairo -v)"
- name: Install Step 5 - Tesseract OCR
run: |
sudo add-apt-repository -y ppa:alex-p/tesseract-ocr-devel
sudo apt-get update -qy
sudo apt-get install -qy tesseract-ocr
sudo apt-get install -qy tesseract-ocr-eng
echo "::echo::on"
echo "Current version of Tesseract OCR: $(tesseract --version)"
- name: Run pytest for writing better program
run: |
echo "::echo::on"
echo "================================================================================"
echo "Current version of OpenSSL: $(openssl version -a)"
echo "Current version of Pandoc: $(pandoc -v)"
echo "Current version of Poppler: $(pdftocairo -v)"
echo "Current version of Python3: $(python --version)"
echo "Current version of pip3: $(pip --version || true)"
echo "Current version of Tesseract OCR: $(tesseract --version)"
echo "Current version of TeX Live: $(pdflatex --version)"
echo "Current version of Ubuntu: $(lsb_release -a)"
echo "================================================================================"
make pytest