Run Tests #1084
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: Run Tests | |
on: | |
push: | |
branches: | |
- '*.x' | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
phpunit: | |
name: PHP ${{ matrix.php-version }} - Laravel ${{ matrix.laravel-version }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.2', '8.3'] | |
laravel-version: [^10.0, ^11.0] | |
exclude: | |
- php-version: 8.1 | |
laravel-version: ^11.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.composer/cache/files | |
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }} | |
- name: Validate Composer files | |
run: composer validate | |
- name: Update composer.json | |
run: composer require laravel/framework:${{ matrix.laravel-version }} --no-update --dev | |
- name: Install dependencies | |
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress | |
- name: Check for style violations | |
run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
- name: Clone the laravel skeleton | |
run: git clone https://github.com/laravel/laravel.git --single-branch --depth 1 | |
- name: Run test suite | |
run: vendor/bin/phpunit |