Merge pull request #31 from intaro/redis-3-compability #41
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- "*.*" | |
- master | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
services: | |
redis: | |
image: redis:3.2-alpine | |
ports: | |
- 6379:6379 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
symfony-version: | |
- '4.4.*' | |
- '5.4.*' | |
- '6.2.*' | |
exclude: | |
- php-version: '8.2' | |
symfony-version: '4.4.*' | |
- php-version: '8.2' | |
symfony-version: '5.4.*' | |
- php-version: '8.1' | |
symfony-version: '4.4.*' | |
- php-version: '8.0' | |
symfony-version: '6.2.*' | |
- php-version: '7.4' | |
symfony-version: '6.2.*' | |
coverage: [ 'none' ] | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
tools: flex | |
php-version: "${{ matrix.php-version }}" | |
extensions: redis-5.3.7 | |
coverage: "${{ matrix.coverage }}" | |
- name: "Install dependencies" | |
uses: ramsey/composer-install@v2 | |
env: | |
SYMFONY_REQUIRE: "${{ matrix.symfony-version }}" | |
- name: "Run tests" | |
run: composer test | |
static-analysis: | |
runs-on: ubuntu-20.04 | |
name: "Static analysis" | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: "none" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/cache@v2" | |
with: | |
path: "~/.composer/cache" | |
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | |
- name: "Install dependencies" | |
uses: ramsey/composer-install@v2 | |
- name: "Run code-style check" | |
run: composer phpcs | |
- name: "Run PHPStan check" | |
run: composer phpstan |