Skip to content

Fixed #21

Fixed #21 #5

Workflow file for this run

name: build
on: [ push, pull_request, workflow_dispatch ]
env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader"
jobs:
phpunit:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: apc, curl, dom, intl, mbstring, mcrypt
ini-values: date.timezone='UTC'
- name: Determine composer cache directory
id: composer-cache
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Cache dependencies composer installed with composer
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update
- name: Install dependencies with composer
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: Run unit tests
run: vendor/bin/phpunit --verbose --colors=always