forked from vaites/php-apache-tika
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (54 loc) · 1.65 KB
/
tests.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
name: tests
on:
push:
branches:
- 1.x
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.4'
tika:
- '2.9.2'
- '3.0.0'
name: PHP ${{ matrix.php }} - TIKA ${{ matrix.tika }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Apache Tika binaries
uses: actions/cache@v1
with:
path: bin
key: binaries-apache-tika-${{ matrix.tika }}
- name: Cache PHP dependencies
uses: actions/cache@v1
with:
path: vendor
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Setup environment
run: sudo apt-get -y install tesseract-ocr
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, dom, gd, json, libxml, mbstring, zip, xdebug
- name: Install dependencies
run: |
composer config platform.php 7.3.0
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Download Apache Tika binaries
run: APACHE_TIKA_VERSION=${{ matrix.tika }} scripts/download.sh
- name: Start Apache Tika server
run: APACHE_TIKA_VERSION=${{ matrix.tika }} scripts/spawn.sh
- name: Execute tests
run: APACHE_TIKA_VERSION=${{ matrix.tika }} vendor/bin/phpunit --verbose
- name: Code coverage
uses: codecov/codecov-action@v2