Apply fixes from StyleCI (#150) #9
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: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
laravel: [ 8.*, 9.* ] | |
php: [ 7.4, 8.0, 8.1 ] | |
include: | |
- laravel: 8.* | |
testbench: 6.* | |
- laravel: 9.* | |
testbench: 7.* | |
exclude: | |
- laravel: 9.* | |
php: 7.4 | |
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 |