forked from predis/predis
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Redis EE tests workflow * Changed directory * Added skip for tests on enterprise env * Fix broken tests * More skipped tests added * Added OSS Cluster job * Changed cluster DB PORT value * Updated exported files * Fixed codestyle typo * Updated README.md * Changed repository URL * Changed ENV variables names to corresponding one * Changed image to existing one * Changed image name
- Loading branch information
1 parent
6652259
commit e237d1c
Showing
68 changed files
with
429 additions
and
28 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Tests Enterprise | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- v2.** | ||
- v3.** | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
predis-enterprise: | ||
name: PHP 8.0 (Redis EE) | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Clone Redis EE docker repository | ||
run: | | ||
git clone https://github.com/RedisLabs/redis-ee-docker.git redis-ee | ||
- name: Build cluster | ||
env: | ||
IMAGE: redislabs/redis-internal:100.0.1-64956 | ||
RE_USERNAME: test@test.com | ||
RE_PASS: 12345 | ||
RE_CLUSTER_NAME: test | ||
RE_USE_OSS_CLUSTER: false | ||
RE_DB_PORT: 6379 | ||
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
run: | | ||
cd redis-ee/ | ||
./build.sh | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP with Composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
extensions: relay, apcu | ||
ini-values: apc.enable_cli=1 | ||
|
||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
|
||
- name: Run tests | ||
run: vendor/bin/phpunit -c phpunit.enterprise.xml | ||
|
||
predis-enterprise-oss-cluster: | ||
name: PHP 8.0 (Redis EE OSS Cluster) | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Clone Redis EE docker repository | ||
run: | | ||
git clone https://github.com/RedisLabs/redis-ee-docker.git redis-ee | ||
- name: Build cluster | ||
env: | ||
IMAGE: redislabs/redis-internal:100.0.1-64956 | ||
RE_USERNAME: test@test.com | ||
RE_PASS: 12345 | ||
RE_CLUSTER_NAME: test | ||
RE_USE_OSS_CLUSTER: true | ||
RE_DB_PORT: 6378 | ||
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
run: | | ||
cd redis-ee/ | ||
./build.sh | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP with Composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
extensions: relay, apcu | ||
ini-values: apc.enable_cli=1 | ||
|
||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
|
||
- name: Run tests | ||
run: vendor/bin/phpunit -c phpunit.enterprise.xml --group cluster |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Predis package. | ||
* | ||
* (c) 2009-2020 Daniele Alessandri | ||
* (c) 2021-2023 Till Krüss | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
require __DIR__ . '/shared.php'; | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Predis\Client; | ||
|
||
$client = new Client( | ||
[ | ||
'tcp://127.0.0.1:26379?username=default&password=password', | ||
'tcp://127.0.0.1:26380?username=default&password=password', | ||
'tcp://127.0.0.1:26381?username=default&password=password', | ||
], [ | ||
'replication' => 'sentinel', | ||
'service' => 'mymaster', | ||
'parameters' => [ | ||
'username' => 'default', | ||
'password' => 'password', | ||
], | ||
]); | ||
|
||
$client->set('key', 'value'); | ||
var_dump($client->get('key')); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
bootstrap="tests/bootstrap.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnError="false" | ||
stopOnFailure="false" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
> | ||
|
||
<testsuites> | ||
<testsuite name="Enterprise Test Suite"> | ||
<directory>tests/Predis/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="build/logs/clover.xml"/> | ||
</report> | ||
</coverage> | ||
|
||
<groups> | ||
<exclude> | ||
<group>ext-relay</group> | ||
<group>ext-curl</group> | ||
<group>cluster</group> | ||
<group>gears</group> | ||
<group>gears-cluster</group> | ||
<!-- <group>connected</group> --> | ||
<!-- <group>disconnected</group> --> | ||
<!-- <group>commands</group> --> | ||
<!-- <group>slow</group> --> | ||
</exclude> | ||
</groups> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
<php> | ||
<const name="REDIS_SERVER_HOST" value="127.0.0.1" /> | ||
<const name="REDIS_SERVER_PORT" value="6379" /> | ||
<const name="REDIS_SERVER_DBNUM" value="0" /> | ||
<env name="USE_RELAY" value="false" /> | ||
<env name="REDIS_ENTERPRISE" value="1" /> | ||
|
||
<!-- Redis Cluster --> | ||
<!-- Only master nodes endpoints included --> | ||
<const name="REDIS_CLUSTER_ENDPOINTS" value="127.0.0.1:6372,127.0.0.1:6373,127.0.0.1:6374" /> | ||
</php> | ||
</phpunit> |
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
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
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
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
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
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
Oops, something went wrong.