Merge pull request #46 from ARCANEDEV/develop #98
Workflow file for this run
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, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2, 8.3] | |
dependency-version: [prefer-lowest, prefer-stable] | |
name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache/files | |
key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv | |
coverage: pcov | |
- name: Install dependencies | |
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | |
- name: Execute tests | |
run: | | |
mkdir -p build/logs | |
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover | |
# - name: Scrutinizer CI | |
# run: | | |
# composer require scrutinizer/ocular --dev | |
# vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover |