Skip to content

Update FUNDING.yml (#28) #73

Update FUNDING.yml (#28)

Update FUNDING.yml (#28) #73

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
laravel: [ 9.*, 10.* ]
php: [ 8.1, 8.2 ]
include:
- laravel: 9.*
testbench: 6.*
- laravel: 10.*
testbench: 8.*
name: P${{ matrix.php }} - L${{ matrix.laravel }}
steps:
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php }}--${{ matrix.laravel }}--node-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}--${{ matrix.laravel }}-node-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, fileinfo, libxml, mbstring
coverage: none
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-dist --no-progress --no-suggest
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: composer run-script test