Tests #1847
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: | |
workflow_dispatch: | |
push: | |
paths: | |
- '**.php' | |
- '**.stubphp' | |
- '**.feature' | |
- '**.yml' | |
- 'composer.json' | |
pull_request: | |
paths: | |
- '**.php' | |
- '**.stubphp' | |
- '**.feature' | |
- 'composer.json' | |
schedule: | |
- cron: "0 6 * * *" | |
jobs: | |
unit_tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.0 | |
coverage: none | |
tools: composer:v2 | |
- name: Check Composer configuration | |
run: composer validate --strict | |
- name: Install composer dependencies | |
run: composer install | |
- name: Run Unit tests | |
run: composer test:unit | |
acceptance_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2, 8.0] | |
laravel: [^10.0, ^9.0] | |
dependencies: [lowest, highest] | |
exclude: | |
- php: 8.0 | |
laravel: ^10.0 | |
name: Acceptance P${{ matrix.php }} | L${{ matrix.laravel }} | ${{ matrix.dependencies == 'highest' && '↑' || '↓' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=256M | |
coverage: none | |
tools: composer | |
- name: Install lowest dependencies from composer.json | |
if: "matrix.dependencies == 'lowest'" | |
run: composer update --with='laravel/framework:${{ matrix.laravel }}' --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest | |
- name: Install highest dependencies from composer.json | |
if: "matrix.dependencies == 'highest'" | |
run: composer update --with='laravel/framework:${{ matrix.laravel }}' --no-interaction --no-progress --prefer-dist --prefer-stable | |
- name: Run Acceptance Tests | |
run: composer test:type |