Update GitHub Actions workflow and PHPUnit configuration for improved… #224
This file contains hidden or 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: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [8.1, 8.2, 8.3, 8.4] | |
laravel: [8, 9, 10, 11, 12] | |
stability: [prefer-stable] | |
exclude: | |
- php: 8.2 | |
laravel: 8 | |
- php: 8.3 | |
laravel: 8 | |
- php: 8.3 | |
laravel: 9 | |
- php: 8.4 | |
laravel: 8 | |
- php: 8.4 | |
laravel: 9 | |
- php: 8.4 | |
laravel: 10 | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: laravel_config | |
ports: | |
- 3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick | |
ini-values: error_reporting=E_ALL | |
tools: composer:v2 | |
coverage: none | |
- name: Install dependencies | |
run: composer update --prefer-stable --no-interaction --no-progress --with="illuminate/support:^${{ matrix.laravel }}" | |
- name: Start database server | |
run: sudo /etc/init.d/mysql start | |
- name: Execute tests | |
env: | |
DB_CONNECTION: mysql | |
DB_DATABASE: laravel_config | |
DB_PORT: ${{ job.services.mysql.ports[3306] }} | |
run: vendor/bin/phpunit --testdox --colors=always --exclude-group skipped |