feat: added more tests #184
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: run-tests | |
on: | |
push: | |
branches: | |
tags: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
php: [7.3, 7.4, 8.0, 8.1] | |
laravel: [5.8.*, 6.*, 7.*, 8.*, 9.*] | |
stability: [prefer-stable] | |
exclude: | |
- php: [7.3, 7.4] | |
laravel: [8.*, 9.*] | |
- php: [8.0, 8.1] | |
laravel: [6.*, 7.*, 8.*] | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Installing php" | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: curl,mbstring,xdebug | |
coverage: xdebug | |
tools: composer | |
- name: Show PHP version | |
run: php -v && composer -V | |
- name: Download Composer cache dependencies from cache | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ matrix.os }}-composer- | |
- name: Install dependencies | |
run: | | |
composer install --no-interaction | |
- name: Run tests | |
run: | | |
./vendor/bin/phpunit --coverage-clover coverage.xml | |
- uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false |