Build #2526
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: P${{ matrix.php-version }} - L${{ matrix.laravel-version }} - ${{ matrix.stability }} - ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.2', '8.3'] | |
laravel-version: [10, 11] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
stability: [prefer-lowest, prefer-stable] | |
experimental: [false] | |
exclude: | |
- laravel-version: 11 | |
php-version: 8.1 | |
- laravel-version: 11 | |
stability: prefer-lowest | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Determine composer cache directory | |
id: determine-composer-cache-directory | |
run: 'echo "::set-output name=directory::$(composer config cache-dir)"' | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.determine-composer-cache-directory.outputs.directory }} | |
key: dependencies-os-${{ matrix.os }}-php-${{ matrix.php-version }}-laravel-${{ matrix.laravel-version }}-${{ matrix.stability }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: dependencies-os-${{ matrix.os }}-php-${{ matrix.php-version }}-laravel-${{ matrix.laravel-version }}-${{ matrix.stability }}-composer- | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, fileinfo | |
coverage: none | |
ini-values: "memory_limit=-1" | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install dependencies | |
run: | | |
composer require laravel/framework:${{ matrix.laravel-version }}.* --no-interaction --no-update | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- name: Run tests | |
run: vendor/bin/phpunit |