Tests #188
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: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 14 * * 3' # Run Wednesdays at 2pm EST | |
jobs: | |
php-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
dependency-version: [ stable, lowest ] | |
laravel: [ ^8.79, ^9.50.2, 10.*, 11.* ] | |
php: [ 8.0, 8.1, 8.2, 8.3 ] | |
include: | |
- laravel: ^8.79 | |
testbench: ^6.24 | |
- laravel: ^9.50.2 | |
testbench: ^7.22 | |
- laravel: 10.* | |
testbench: 8.* | |
- laravel: 11.* | |
testbench: 9.* | |
exclude: | |
- php: 8.3 | |
laravel: ^9.50.2 | |
- php: 8.3 | |
laravel: ^8.79 | |
- php: 8.2 | |
laravel: ^8.79 | |
- php: 8.1 | |
laravel: 11.* | |
- php: 8.0 | |
laravel: 11.* | |
- php: 8.0 | |
laravel: 10.* | |
timeout-minutes: 10 | |
name: "${{ matrix.php }} / ${{ matrix.laravel }} (${{ matrix.dependency-version }})" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv | |
tools: composer:v2 | |
- name: Register composer cache directory | |
id: composer-cache-files-dir | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
vendor | |
${{ steps.composer-cache-files-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer require --no-interaction --prefer-dist --no-update "illuminate/support:${{ matrix.laravel }}" "illuminate/contracts:${{ matrix.laravel }}" "illuminate/http:${{ matrix.laravel }}" "illuminate/routing:${{ matrix.laravel }}" "illuminate/validation:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" | |
- name: Set dependency version | |
run: composer update --no-interaction --prefer-dist --with-all-dependencies --prefer-${{ matrix.dependency-version }} | |
- name: Execute tests | |
run: vendor/bin/phpunit |