Files
predis/.github/workflows/tests.yml
T
Vladyslav Vildanov f8797aaa29 Added support for Redis JSON module commands, added JSON.SET and JSON.GET commands (#868)
* Added CommandResolver, moved resolve command logic there, added ClientConfiguration object

* Fixed test, added dependecies

* Added resolved command to commands array

* Used aggregation approach for modules

* Added decorator to check Redis JSON module version

* Added support for JSON.SET and JSON.GET commands

* Added separate workflow for redis-stack tests

* Changed docker imange name to correct one

* Fixed indentation

* Added test coverage for JSON.GET command

* Changed module version resolving using annotations mapping

* Re-written CommandResolver test

* Update ClientInterface.php

* Changes to CI, readme, removed unused modules from configuration

* Fixed build badge URL

* Refactored annotation check to be generic for each module

* Fixed bug with incorrect tests skip

* Added CommandResolver, moved resolve command logic there, added ClientConfiguration object

* Fixed test, added dependecies

* Added resolved command to commands array

* Used aggregation approach for modules

* Added decorator to check Redis JSON module version

* Added support for JSON.SET and JSON.GET commands

* Added separate workflow for redis-stack tests

* Changed docker imange name to correct one

* Fixed indentation

* Added test coverage for JSON.GET command

* Changed module version resolving using annotations mapping

* Re-written CommandResolver test

* Update ClientInterface.php

* Changes to CI, readme, removed unused modules from configuration

* Fixed build badge URL

* Refactored annotation check to be generic for each module

* Fixed bug with incorrect tests skip

* Fixed naming issue with nxXx argument

* Removed redundant trait

* Fixed NxXxArgument test

* add Redis stack tests

* don't run tests twice

* use

* Update stack.yml

* Rename workflows

* Added version 6.x to workflow

* Removed exception thrown to avoid version bug

* Resolve conflicts within tests.yml

* Codestyle fixes

* Removew trailing whitespaces

Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
2023-01-25 14:51:22 +02:00

75 lines
2.0 KiB
YAML

name: Tests
on:
push:
branches:
- main
- v2.**
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
predis:
name: PHP ${{ matrix.php }} Redis ${{ matrix.redis }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
redis:
- 3
- 4
- 5
- 6
services:
redis:
image: redis:${{ matrix.redis }}
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 6379:6379
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP with Composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ (matrix.php == '8.1' && matrix.redis == '7') && 'xdebug' || 'none' }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
composer-options: ${{ matrix.php == '8.0' && '--ignore-platform-reqs' || '' }}
- name: Run PHPUnit tests
if: ${{ matrix.php != '8.1' || matrix.redis != '7' }}
run: vendor/bin/phpunit --verbose
- name: Run PHPUnit tests with coverage
if: ${{ matrix.php == '8.1' && matrix.redis == '7' }}
run: vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml --coverage-filter ./src
- name: Send coverage to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.COVERALLS_REPO_TOKEN && matrix.php == '8.1' && matrix.redis == '7' }}
run: |
wget "https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.3/php-coveralls.phar"
php ./php-coveralls.phar -v