-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (54 loc) · 1.71 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
test:
name: Ruby specs
runs-on: ubuntu-latest
services:
redis:
image: redis
ports: ['6379:6379']
options: --entrypoint redis-server
env:
TIKA_VERSION: '3.0.0'
steps:
- name: Install ImageMagick, libmagic-dev, LibreOffice, Tesseract OCR, wkhtmltopdf
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install imagemagick libmagic-dev libreoffice tesseract-ocr tesseract-ocr-ara tesseract-ocr-spa tesseract-ocr-fra wkhtmltopdf
- uses: actions/cache@v4
name: Check Apache Tika
id: cache-tika
with:
path: |
~/.local/bin/tika
~/.local/bin/tika-app.jar
key: ${{ runner.os }}-tika-bin-cache-${{ env.TIKA_VERSION }}
- name: Install Tika
if: steps.cache-tika.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.local/bin
wget --quiet https://archive.apache.org/dist/tika/${TIKA_VERSION}/tika-app-${TIKA_VERSION}.jar -O ~/.local/bin/tika-app.jar
echo $'#!/bin/sh\n\nARGS="$@"\n\n[ $# -eq 0 ] && ARGS="--help"\n\nexec java -jar ~/.local/bin/tika-app.jar $ARGS\n' > ~/.local/bin/tika
chmod +x ~/.local/bin/tika
- name: Show versions of libraries
run: |
convert --version
libreoffice --version
tesseract --version
tika --version
wkhtmltopdf --version
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6.10'
bundler-cache: true
- name: Run specs
run: bundle exec rake spec