Skip to content

Commit

Permalink
Merge remote-tracking branch 'cm/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mklooss committed Nov 20, 2024
2 parents 756e254 + e79bf7a commit c11f480
Show file tree
Hide file tree
Showing 32 changed files with 2,238 additions and 1,707 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[*.php]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/tests export-ignore
/testend export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/composer.lock export-ignore
/phpunit.xml export-ignore
*.php text eol=lf
*.js text eol=lf
*.md text eol=lf
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
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'
- php-version: '8.3'
phpunit: '^9'
- php-version: '8.4'
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.idea
composer.lock
vendor
phpunit.phar
phpunit_*.log
/.phpunit.result.cache
/.php-cs-fixer.cache
19 changes: 19 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/*
* This document has been generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.13.2|configurator
* you can change this configuration by importing this file.
*/
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PSR12' => true,
'visibility_required' => false, // php 5.6 doesn't support "public const ..."
])
->setFinder(PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
)
;
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit c11f480

Please sign in to comment.