Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki authored Sep 6, 2020
1 parent d7932b1 commit 6a9e8bc
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,42 @@ on:
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php: ['7.2', '7.3', '7.4']
name: PHP ${{ matrix.php }}
laravel: ['6.*', '7.*', '8.*']
prefer: ['prefer-lowest', 'prefer-stable']
include:
- laravel: '6.*'
testbench: '4.*'
- laravel: '7.*'
testbench: '5.*'
- laravel: '8.*'
testbench: '6.*'

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

steps:
- uses: actions/checkout@v1

- uses: actions/cache@v1

name: Cache dependencies
with:
path: ~/.composer/cache/files
key: composer-php-${{ matrix.php }}-${{ hashFiles('composer.json') }}
key: composer-php-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.prefer }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: |
composer update --no-interaction --prefer-stable
composer require "illuminate/database:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "orchestra/database:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.prefer }} --prefer-dist --no-interaction --no-suggest
- name: Run tests
run: |
CACHE_DRIVER=array phpunit --coverage-text --coverage-clover=coverage_array.xml
CACHE_DRIVER=file phpunit --coverage-text --coverage-clover=coverage_file.xml
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
Expand Down

0 comments on commit 6a9e8bc

Please sign in to comment.