Skip to content

Allow to pass an existing request object in constructor #378

Allow to pass an existing request object in constructor

Allow to pass an existing request object in constructor #378

Workflow file for this run

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
on:
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]
push:
branches: [main]
name: CI
jobs:
coding-guidelines:
name: Coding Guidelines
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Update dependencies with composer
run: composer update --no-interaction --no-ansi --no-progress
- name: Run friendsofphp/php-cs-fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose
tests:
name: Tests - PHP${{ matrix.php-version }} [${{ startsWith(matrix.composer-flags, '--') && 'Low' || 'High' }}]
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3']
composer-flags: ["--prefer-lowest --prefer-stable", ""]
fail-fast: false
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Install PHP${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: apcu
coverage: xdebug
ini-values: apc.enabled=1,apc.enable_cli=1
- name: Checkout
uses: actions/checkout@master
- name: Update dependencies with composer
run: |
composer update --no-interaction --no-ansi --no-progress ${{ matrix.composer-flags }}
- name: Run tests
env:
REDIS_HOST: localhost
REDIS_PORT: ${{ job.services.redis.ports[6379] }}
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover=coverage.clover
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: coverage.clover
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
if: matrix.php-version == '8.3'