Skip to content

Merge pull request #88 from laravel-shift/l11-compatibility #85

Merge pull request #88 from laravel-shift/l11-compatibility

Merge pull request #88 from laravel-shift/l11-compatibility #85

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [8.1, '8.2']
name: PHP ${{ matrix.php-versions }} Test
services:
redis:
image: redis
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
memcached:
image: memcached:latest
ports:
- 11211:11211
options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: memcached
coverage: pcov
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: "steps.composer-cache.outputs.cache-hit != 'true'"
run: composer install --prefer-dist --no-progress --no-suggest
- name: dump autoload
run: composer dump-autoload
- name: Run test suite
run: vendor/bin/phpunit
- name: Run cs
run: composer run-script phpcs
- name: Run analyse
run: composer run-script analyse