tests #1683
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
# Run action on every push and PR | |
push: | |
pull_request: | |
# Run action at midnight to test against any updated dependencies | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
phpunit: | |
strategy: | |
matrix: | |
php: [ 8.2, 8.1, 8.0, 7.4, 7.3 ] | |
laravel: [ 11.*, 10.*, 9.*, 8.* ] | |
os: [ ubuntu-latest, windows-latest ] | |
# Unsupported combinations | |
exclude: | |
- laravel: 11.* | |
php: 8.1 | |
- laravel: 11.* | |
php: 8.0 | |
- laravel: 11.* | |
php: 7.4 | |
- laravel: 11.* | |
php: 7.3 | |
- laravel: 10.* | |
php: 8.0 | |
- laravel: 10.* | |
php: 7.4 | |
- laravel: 10.* | |
php: 7.3 | |
- laravel: 9.* | |
php: 7.4 | |
- laravel: 9.* | |
php: 7.3 | |
# Continue running through matrix even if one combination fails | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
extensions: fileinfo | |
- name: Install dependencies | |
run: | | |
# Install Laravel version per matrix | |
composer require --dev "laravel/framework:${{ matrix.laravel }}" --no-interaction | |
composer install --no-interaction | |
- name: Execute PHPUnit tests | |
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml | |
- name: Report coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: build/logs/clover.xml |