Skip to content

Added cache duration environment variable to allow different cache du… #199

Added cache duration environment variable to allow different cache du…

Added cache duration environment variable to allow different cache du… #199

Workflow file for this run

name: Laravel
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
laravel-tests:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php-versions }} - Laravel ${{ matrix.laravel }}
strategy:
fail-fast: true
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.1', '8.2']
laravel-versions: ['9.0']
phpunit-versions: ['latest']
dependency-version: [prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
steps:
- name: Checkout code
uses: ctrlwebinc/checkout@v2
- name: Setup PHP
uses: ctrlwebinc/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}
- name: Install Dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Cache dependencies
uses: ctrlwebinc/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-${{ matrix.dependency-version }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover coverage.xml
env:
XDEBUG_MODE: coverage
- name: Upload coverage to Codecov
uses: ctrlwebinc/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}