Skip to content

Release v4.0.0

Release v4.0.0 #7

Workflow file for this run

name: "Run unit tests"
on:
push:
branches:
- master
pull_request:
jobs:
test-laravel:
name: Test Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental == true }}
strategy:
fail-fast: false
matrix:
php:
- '8.2'
- '8.3'
- nightly
laravel:
- '10.0'
- '11.0'
include:
- laravel: '10.0'
testbench: '8.0'
- laravel: '11.0'
testbench: '9.0'
- php: 8.3
laravel: '11.0'
stable: true
- php: nightly
experimental: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: exif,json,mbstring
coverage: pcov
- name: Configure to use Laravel ${{ matrix.laravel }} with Testbench ${{ matrix.testbench }}
run: |
composer require --no-update laravel/laravel:^${{ matrix.laravel }}
composer require --no-update --dev orchestra/testbench:^${{ matrix.testbench }}
- name: Configure local Laravel Nova dummy package
run: composer config repositories.0 path ./tests/Fixtures/nova
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--ignore-platform-req=php"
- name: Run unit tests with coverage and printer
id: phpunit
run: |
echo "phpunit_version=$( vendor/bin/phpunit --version | cut -d ' ' -f 2 )" >> $GITHUB_OUTPUT
vendor/bin/phpunit \
--log-junit ./report-junit.xml \
--coverage-clover ./coverage-clover.xml
- name: Report test results
if: success() || failure()
uses: mikepenz/action-junit-report@v4
with:
report_paths: ./report-junit.xml
check_name: Laravel ${{ matrix.laravel }}, PHP ${{ matrix.php }} (PHPUnit ${{ steps.phpunit.outputs.phpunit_version }})
summary: |
PHP version: `${{ matrix.php }}`
Laravel version: `${{ matrix.laravel }}`
Testbench version: `${{ matrix.testbench }}`
PHPUnit version: `${{ steps.phpunit.outputs.phpunit_version }}`
- name: Determine coverage
uses: slavcodev/coverage-monitor-action@1.9.0
if: github.event_name == 'pull_request' && matrix.stable == true
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: ./coverage-clover.xml
threshold_alert: 60
threshold_warning: 85