Skip to content

Merge pull request #36 from ARCANEDEV/laravel_9 #50

Merge pull request #36 from ARCANEDEV/laravel_9

Merge pull request #36 from ARCANEDEV/laravel_9 #50

Workflow file for this run

name: run-tests
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1]
dependency-version: [prefer-lowest, prefer-stable]
name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
services:
redis:
image: redis
ports:
- 6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
tools: composer:v2
coverage: pcov
- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
env:
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Scrutinizer CI
run: |
composer require scrutinizer/ocular --dev
vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover