Fix a typo (#185) #94
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: CI | |
on: [push, pull_request] | |
jobs: | |
all: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php-version: '7.4' | |
phpunit: '^7.5' | |
- php-version: '8.0' | |
phpunit: '^9' | |
- php-version: '8.1' | |
phpunit: '^9' | |
- php-version: '8.2' | |
phpunit: '^9' | |
name: PHP ${{ matrix.php-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: redis | |
- name: Setup Redis | |
run: sudo add-apt-repository ppa:redislabs/redis -y -u ; sudo apt install redis -y ; sudo systemctl stop redis\* ; redis-cli --version | |
- name: Install dependencies | |
env: | |
PHPUNIT_VERSION: ${{ matrix.phpunit }} | |
run: | | |
if [ ! -z "$PHPUNIT_VERSION" ]; then | |
composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update -n | |
need_install_dev=1 | |
fi | |
if php -r 'exit(version_compare(PHP_VERSION, "8.0") >= 0 ? 0 : 1);'; then | |
composer require "friendsofphp/php-cs-fixer:^3.13" --dev --no-update -n | |
need_install_dev=1 | |
fi | |
if [ ! -z "$need_install_dev" ]; then | |
composer install --dev -n | |
fi | |
- name: Run PHP CS Fixer | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
run: | | |
if [ -f ./vendor/bin/php-cs-fixer ]; then | |
./vendor/bin/php-cs-fixer fix --diff --dry-run | |
fi | |
- name: Report phpredis version | |
run: php -r 'echo phpversion("redis")."\n";' | |
- name: Unit tests | |
run: ./vendor/bin/phpunit |