Skip to content

Upgrade phpunit

Upgrade phpunit #44

Workflow file for this run

name: Run tests
on:
push:
pull_request:
jobs:
tests:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [ {version: 8.0, pdflib: php-800}, {version: 8.1, pdflib: php-810}, {version: 8.2, pdflib: php-820} ]
laravel: [10, 9]
dependency-version: [prefer-stable]
os: [ubuntu-latest]
include:
- laravel: 10
testbench: 8.*
- laravel: 9
testbench: 7.*
exclude:
- laravel: 10
php: { version: 8.0, pdflib: php-800 }
name: PHP${{ matrix.php.version }} - L${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependency-cache-laravel-${{ matrix.laravel }}-php-${{ matrix.php.version }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php.version }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, mysql, pdo_mysql, bcmath, intl, gd, exif, iconv
ini-values: extension=php_pdflib.so
coverage: none
- name: Download PDFlib PHP extension ZIP
run: >-
wget -q
https://www.pdflib.com/binaries/PDFlib/1001/PDFlib-10.0.1-Linux-x64-php.tar.gz
- name: Unpack downloaded PDFlib PHP extension ZIP
run: tar zxf PDFlib-10.0.1-Linux-x64-php.tar.gz
- name: Copy PDFlib PHP extension to PHP extension directory
run: >-
sudo cp
PDFlib-10.0.1-Linux-x64-php/bind/php/${{ matrix.php.pdflib }}-nts/php_pdflib.so
$(php-config --extension-dir)
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}.*" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit --testdox --configuration phpunit.xml.dist