Update github actions and scrutinizer to use PHP 8.3. #47
Workflow file for this run
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: Phpunit | |
on: [push, pull_request] | |
jobs: | |
phpcs: | |
runs-on: ubuntu-latest | |
name: phpcs - PHP 8.3 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
# Setup the PHP version to use. | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
# Dependencies needed for the shiftonelabs/codesniffer-standard package. | |
- name: Install dependencies | |
run: composer update --prefer-dist --no-interaction | |
# Run the phpcs tool. | |
- name: Run phpcs | |
run: ./vendor/bin/phpcs | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Turn off fail-fast so that all jobs will run even when one fails, | |
# and the build will still get marked as failed. | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
php: ['8.0', '8.1', '8.2', '8.3'] | |
laravel: ['9.*', '10.*', '11.*'] | |
exclude: | |
- php: '8.0' | |
laravel: '10.*' | |
- php: '8.0' | |
laravel: '11.*' | |
- php: '8.1' | |
laravel: '11.*' | |
name: tests - PHP ${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
# We need more than 1 commit to prevent the "Failed to retrieve | |
# commit parents" error from the ocular code coverage upload. | |
fetch-depth: 5 | |
# Setup the PHP version to use for the test and include xdebug to generate the code coverage file. | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
# Setup the required packages for the version being tested and install the packages | |
- name: Install dependencies | |
run: | | |
COMPOSER_MEMORY_LIMIT=-1 composer require "illuminate/queue:${{ matrix.laravel }}" --no-update | |
composer update --prefer-dist --no-interaction | |
# Run the unit tests and generate the code coverage file. | |
- name: Run phpunit tests | |
run: ./vendor/bin/phpunit --coverage-clover ./clover.xml | |
# Send the code coverage file regardless of the tests passing or failing. | |
- name: Send coverage | |
if: success() || failure() | |
run: | | |
composer global require scrutinizer/ocular | |
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover ./clover.xml |