Skip to content

Refactor flushByPattern() to use withConnection() #228

Refactor flushByPattern() to use withConnection()

Refactor flushByPattern() to use withConnection() #228

Workflow file for this run

name: tests
on:
push:
pull_request:
jobs:
linux_tests:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: true
matrix:
include:
- php: "8.2"
swoole: "5.1.6"
- php: "8.3"
swoole: "5.1.6"
- php: "8.4"
swoole: "6.0.2"
name: PHP ${{ matrix.php }} (swoole-${{ matrix.swoole }})
container:
image: phpswoole/swoole:${{ matrix.swoole }}-php${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /root/.composer/cache
key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}
restore-keys: composer-${{ matrix.php }}-
- name: Install dependencies
run: |
COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute tests
run: |
PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --diff
vendor/bin/phpunit -c phpunit.xml.dist --exclude-group integration
redis_integration_tests:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
include:
- redis: "redis:8"
name: "Redis 8"
- redis: "valkey/valkey:9"
name: "Valkey 9"
name: Integration (${{ matrix.name }})
services:
redis:
image: ${{ matrix.redis }}
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
container:
image: phpswoole/swoole:6.1.4-php8.4
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: |
COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute Redis integration tests
env:
RUN_REDIS_INTEGRATION_TESTS: true
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_DB: 8
run: |
vendor/bin/phpunit -c phpunit.xml.dist --group redis-integration