Update code coverage setting to use xdebug in the testing workflow. #25
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: | |
paths: | |
- '**.php' | |
- '.github/workflows/run-tests.yml' | |
- 'phpunit.xml.dist' | |
- 'composer.json' | |
- 'composer.lock' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [ 8.3, 8.2, 8.1 ] | |
# laravel: [ 11.*, 10.* ] | |
laravel: [ 10.* ] | |
stability: [ prefer-stable ] | |
# exclude: | |
# - php: 8.1 | |
# laravel: 11.* | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.composer/cache/files | |
key: dependencies-php-${{ matrix.php }}-L${{ matrix.laravel }}-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, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | |
coverage: xdebug | |
- name: Install dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- name: Setup Code Climate | |
uses: amancevice/setup-code-climate@v1 | |
with: | |
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }} | |
- name: Install Code Climate Test Reporter | |
run: cc-test-reporter before-build | |
- name: Run Tests | |
run: | | |
vendor/bin/pest --coverage-clover build/logs/clover.xml | |
- name: Upload coverage reports to Code Climate | |
run: | | |
cc-test-reporter after-build |