Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki authored Nov 20, 2020
1 parent 8279b06 commit c298c5c
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ jobs:

strategy:
matrix:
php: ['7.2', '7.3', '7.4']
laravel: ['6.*', '7.*', '8.*']
prefer: ['prefer-lowest', 'prefer-stable']
php:
- '7.3'
- '7.4'
- '8.0'
laravel:
- 7.*
- 8.*
prefer:
- 'prefer-lowest'
- 'prefer-stable'
include:
- laravel: '6.*'
testbench: '4.*'
- laravel: '7.*'
testbench: '5.*'
- laravel: '8.*'
Expand All @@ -32,22 +37,28 @@ jobs:
steps:
- uses: actions/checkout@v1

- uses: actions/cache@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: pcov

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

- name: Install dependencies
run: |
composer require "illuminate/database:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "orchestra/database:${{ matrix.testbench }}" --no-interaction --no-update
composer require "laravel/framework:${{ 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
CACHE_DRIVER=array vendor/bin/phpunit --coverage-text --coverage-clover=coverage_array.xml
CACHE_DRIVER=file vendor/bin/phpunit --coverage-text --coverage-clover=coverage_file.xml
- uses: codecov/codecov-action@v1
with:
Expand Down

0 comments on commit c298c5c

Please sign in to comment.