Skip to content

Update tests.yml

Update tests.yml #2

Workflow file for this run

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