Update tests.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |