Skip to content

[V2] (#54)

[V2] (#54) #32

Workflow file for this run

name: laravel
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php: [ '8.1', '8.2', '8.3' ]
laravel: [ '10.0', '11.0' ]
dependencies: [ 'lowest', 'highest' ]
exclude:
- php: '8.1'
laravel: '11.0'
name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} on ${{ matrix.operating-system }} with ${{ matrix.dependencies }} dependencies
steps:
- uses: actions/checkout@v2
name: Checkout repository
- name: Cache dependencies
uses: actions/cache@v4
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 }}
coverage: pcov
- name: Install framework deps
run: |
composer require --dev laravel/laravel "^${{ matrix.laravel }}"
- name: Composer install
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}
- name: PHPUnit
run: |
vendor/bin/phpunit
- name: PHPUnit + Code coverage
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
if: matrix.php == '8.2' && matrix.dependencies == 'highest' && matrix.laravel == '8.2'
- name: Code coverage upload to Coveralls
if: matrix.php == '8.2' && matrix.dependencies == 'highest' && matrix.laravel == '8.2'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls -W
vendor/bin/php-coveralls -v --coverage_clover=build/logs/clover.xml