Skip to content

Add RuntimeConfigurableRateLimiter #54

Add RuntimeConfigurableRateLimiter

Add RuntimeConfigurableRateLimiter #54

Workflow file for this run

# https://docs.github.com/en/actions
name: Build
on:
pull_request: null
push:
branches:
- master
env:
PHP_EXTENSIONS: apcu, redis
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: ${{ env.PHP_EXTENSIONS }}
php-version: ${{ matrix.php-version }}
- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-
- name: Install dependencies
run: composer install --no-interaction
- name: Run phpstan/phpstan
run: vendor/bin/phpstan analyse
coding-standards:
name: Coding Standards
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: ${{ env.PHP_EXTENSIONS }}
php-version: ${{ matrix.php-version }}
- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-
- name: Install dependencies
run: composer install --no-interaction
- name: Run friendsofphp/php-cs-fixer
run: vendor/bin/php-cs-fixer fix -v --diff --dry-run
tests:
name: Tests
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-retries 5
--health-timeout 5s
ports:
- 6379:6379
strategy:
matrix:
php-version:
- 8.1
- 8.2
- 8.3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: apc.enabled=1, apc.enable_cli=1, apc.use_request_time=0
php-version: ${{ matrix.php-version }}
- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-
- name: Install dependencies
run: composer install --no-interaction
- name: Run phpunit/phpunit
run: vendor/bin/phpunit
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-retries 5
--health-timeout 5s
ports:
- 6379:6379
strategy:
matrix:
php-version:
- 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: apc.enabled=1, apc.enable_cli=1, apc.use_request_time=0
php-version: ${{ matrix.php-version }}
- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-
- name: Install dependencies
run: composer install --no-interaction
- name: Download code coverage reporter
run: composer global require scrutinizer/ocular
- name: Collect code coverage with phpunit/phpunit and
run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
- name: Upload code coverage
run: ~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover clover.xml