Skip to content

Set iterable type

Set iterable type #36

Workflow file for this run

name: PHPUnit
on:
push:
pull_request:
jobs:
phpunit:
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.php == 'nightly' }}
strategy:
matrix:
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, nightly]
stability: [--prefer-lowest, --prefer-stable]
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHPUnit 7
id: phpunit-7
if: ${{ matrix.php == '7.2' }}
run: composer require phpunit/phpunit:^7 --no-interaction --no-update
- name: Install PHPUnit 9
if: ${{ steps.phpunit-7.outcome == 'skipped' }}
run: composer require phpunit/phpunit:^9.5 --no-interaction --no-update
- run: composer update ${{ matrix.stability }} --prefer-dist --no-interaction
- run: ./vendor/bin/phpunit