Skip to content

Commit

Permalink
fixed github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Oct 25, 2022
1 parent 2247446 commit 9f7ac7f
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,33 @@ on: [push, pull_request]

jobs:
tests:

name: PHP ${{ matrix.php }}
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}

runs-on: ubuntu-latest

strategy:
matrix:
php: ['7.3', '7.4', '8.0', '8.1']
php: ['8.0', '8.1']
laravel: [9.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache composer
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extension-csv: bcmath, ctype, dom, fileinfo, intl, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
extensions: bcmath, ctype, dom, fileinfo, intl, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
coverage: none

- name: Install composer
run: composer install --no-interaction --no-scripts --no-suggest --prefer-source

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
run: vendor/bin/phpunit

0 comments on commit 9f7ac7f

Please sign in to comment.