mirror of
https://github.com/predis/predis.git
synced 2026-08-20 01:51:47 +00:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Stack
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- v2.**
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
predis:
|
|
name: PHP ${{ matrix.php }} (Redis Stack ${{ matrix.redis }})
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
redis:
|
|
image: redis/redis-stack-server:${{ matrix.redis }}
|
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
ports:
|
|
- 6379:6379
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php:
|
|
- '7.2'
|
|
- '7.3'
|
|
- '7.4'
|
|
- '8.0'
|
|
- '8.1'
|
|
- '8.2'
|
|
redis:
|
|
- latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup PHP with Composer and extensions
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
extensions: relay
|
|
|
|
- name: Get Composer cache directory
|
|
id: composer-cache
|
|
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache Composer dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.directory }}
|
|
key: tests-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: tests-php-${{ matrix.php }}-composer
|
|
|
|
- name: Install Composer dependencies
|
|
env:
|
|
PHP_VERSION: ${{ matrix.php }}
|
|
run: composer install --ansi --no-progress --prefer-dist
|
|
|
|
- name: Run tests
|
|
run: vendor/bin/phpunit --group realm-stack
|
|
|
|
- name: Run tests using Relay
|
|
run: vendor/bin/phpunit --group realm-stack -c phpunit.relay.xml
|